Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* grammar for class types, reraised
@ 1999-06-14  8:04 Hendrik Tews
  1999-06-14 21:30 ` Jerome Vouillon
  0 siblings, 1 reply; 5+ messages in thread
From: Hendrik Tews @ 1999-06-14  8:04 UTC (permalink / raw)
  To: caml-list

Hi,

on May 14th I sent the appended message to the ocaml mailing
list. Unfortunately I haven't seen any answer so far. Could one
of the developers please answer these questions (or give some
pointers)?

1. What is the difference between

# class type b = [int, string] a;;

and 

# type c = (int, string) a;;  

assuming some class type a with two type parameters?

And why do I have to use different parentheses in both cases?
(Yes, I know, it's what the manual says, but I would expect that
one kind of parentheses should be enough for all kind of type
parameters. )

2. Why is it not possible to add type constraints to the first
kind of type abbreviation, like in 

class type ['a] c = ['a, string] a constraint 'a = int;;

3. (To re-raise a question from John Prevost which has never been
addressed:) Why is it not possible to mix type definitions and
class type definitions like in

# class type a = object method m : a end
# and
# type b = Node of a | Tree of b * b

(Yes, it is possible to use the < ... > notation, but it is not
possible to use # with such types.)

Bye,

Hendrik




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-06-23 19:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-14  8:04 grammar for class types, reraised Hendrik Tews
1999-06-14 21:30 ` Jerome Vouillon
1999-06-15 17:04   ` John Prevost
1999-06-22 17:00   ` Hendrik Tews
1999-06-23  1:40     ` Jacques GARRIGUE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox