caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] GADT definition
@ 2013-12-19 22:17 Lukasz Stafiniak
  2013-12-19 22:20 ` Lukasz Stafiniak
  0 siblings, 1 reply; 7+ messages in thread
From: Lukasz Stafiniak @ 2013-12-19 22:17 UTC (permalink / raw)
  To: Caml

[-- Attachment #1: Type: text/plain, Size: 585 bytes --]

Hi,

This is just a test so I'm not much concerned, but I have these definitions:

type z
type _ s
type (_, _, _) balance =
  | Less : (*∀'a.*) ('a, 'a s, 'a s) balance
  | Same : (*∀'b.*) ('b, 'b, 'b) balance
  | More : (*∀'a.*) ('a s, 'a, 'a s) balance
type _ aVL =
  | Leaf : z aVL
  | Node : (*∀'a, 'b, 'c.*)('a, 'b, 'c) balance * 'a aVL * int * 'b aVL ->
    ('c s) aVL

and I get the error for "type _ aVL =":

Error: In this definition, a type variable cannot be deduced
       from the type parameters.

What to do?

Regards,
Łukasz "lukstafi"

[-- Attachment #2: Type: text/html, Size: 993 bytes --]

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

end of thread, other threads:[~2013-12-19 23:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-19 22:17 [Caml-list] GADT definition Lukasz Stafiniak
2013-12-19 22:20 ` Lukasz Stafiniak
2013-12-19 22:21   ` Lukasz Stafiniak
2013-12-19 22:27     ` Milan Stanojević
2013-12-19 22:35       ` Lukasz Stafiniak
2013-12-19 23:10         ` Gabriel Scherer
2013-12-19 23:47           ` Jacques Le Normand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).