Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* Error: In the definition of t, type ('a, 'b) t should be ('b, 'a) t
@ 2010-01-06  6:39 Edgar Friendly
  2010-01-06  7:47 ` [Caml-list] " Jacques Garrigue
  0 siblings, 1 reply; 2+ messages in thread
From: Edgar Friendly @ 2010-01-06  6:39 UTC (permalink / raw)
  To: caml-list

This error message was new to me, and I wondered what's going on and why:

# type ('a, 'b) t = [ `A | `T of ('b, 'a) t ];;
Error: In the definition of t, type ('a, 'b) t should be ('b, 'a) t

I can get unhelpful suggestions through foolishness with three type 
parameters:
# type ('a, 'b, 'c) t = [ `A | `T of ('a, 'c, 'b) t | `V of ('b, 'c, 'a) 
t];;
Error: In the definition of t, type ('a, 'b, 'c) t should be ('c, 'a, 'b) t
# type ('c, 'a, 'b) t = [ `A | `T of ('a, 'c, 'b) t | `V of ('b, 'c, 'a) 
t];;
Error: In the definition of t, type ('a, 'b, 'c) t should be ('b, 'c, 'a) t

Any explanation of what's going on?

Thanks,
E


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

end of thread, other threads:[~2010-01-06  7:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-06  6:39 Error: In the definition of t, type ('a, 'b) t should be ('b, 'a) t Edgar Friendly
2010-01-06  7:47 ` [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