Version française
Home     About     Download     Resources     Contact us    
Browse thread
Implicit constraints in type declaration
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alain Frisch <frisch@c...>
Subject: Implicit constraints in type declaration
Hello,

I don't understand why the following type declaration implies a
constraint:

# type 'a t = int and b = int t;;
type 'a t = int constraint 'a = int
type b = int t

Also, I don't understand this error message (I can imagine why
the declaration is illegal):

# type 'a t = u and u = int;;
                    ^^^^^^^
A type variable is unbound in this type declaration


-- 
  Alain Frisch