Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* type parameter of polymorphic variant types
@ 2005-07-14  4:03 Keiko Nakata
  2005-07-14  6:42 ` [Caml-list] " Jacques Garrigue
  0 siblings, 1 reply; 2+ messages in thread
From: Keiko Nakata @ 2005-07-14  4:03 UTC (permalink / raw)
  To: caml-list

Hello.

Why I cannot have these type definitions?

#type ('a,'b) t = ['a | 'b] constraint 'a =[>] constraint 'b = [>];;
#type ('a,'b) t = A of 'a * 'b constraint 'a = [>'b];;


Moreover, for the type definition 

#type ('a, 'b) u = 'a constraint 'a = [>`A | 'b] ;;

the type checker reports an error 

  Characters 48-50:
    type ('a,'b) t = A of 'a * 'b constraint 'a = [>'b];;
                                                    ^^
  The type 'a is not a polymorphic variant type

Is this a kind of typo of 'a for 'b or an intention?


Regards,
Keiko.


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

end of thread, other threads:[~2005-07-14  6:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-14  4:03 type parameter of polymorphic variant types Keiko Nakata
2005-07-14  6:42 ` [Caml-list] " Jacques Garrigue

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