caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Lukasz Stafiniak <lukstafi@gmail.com>
To: Caml <caml-list@inria.fr>
Subject: [Caml-list] GADT definition
Date: Thu, 19 Dec 2013 23:17:42 +0100	[thread overview]
Message-ID: <CAJMfKEUsQn6MmcwDPhOzwrozOr5biQb-ktVaS2x=KwCdCZEARw@mail.gmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2013-12-19 22:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-19 22:17 Lukasz Stafiniak [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJMfKEUsQn6MmcwDPhOzwrozOr5biQb-ktVaS2x=KwCdCZEARw@mail.gmail.com' \
    --to=lukstafi@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).