Browse thread
[Caml-list] Comments on type variables
-
Alain Frisch
- Francois Pottier
-
Jacques Garrigue
- Laurent Vibert
- Pierre Weis
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2002-06-11 (13:09) |
From: | Laurent Vibert <lvibert@i...> |
Subject: | Re: [Caml-list] Comments on type variables |
On Fri, 7 Jun 2002, Jacques Garrigue wrote: > > Interaction with local modules > > ------------------------------ > > > > Inside a local module, type variables introduced outside the module are > > invisible: > > > > # let f (x : 'a) = > > let module M = struct type t = 'a list end in ();; > > Unbound type parameter 'a > > To be expected by the rules above. Functions with local modules are > not functors. 'a is not a type constructor. this has a draw-back : some local modules don't have any valid signature : for exemple, what is the signature of the module M ? let f (x:'a) = let module M = struct let v = x end in ... ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners