[
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: | -- (:) |
| From: | Pierre Weis <pierre.weis@i...> |
| Subject: | Re: [Caml-list] Queue example |
Hi, > I'm just trying to figure out how to create a queue of a specific type in > a .ml file. I can do it in the interpreter as: [...] > Declaring this in a .ml file gives > > The type of this expression, '_a Queue.t, > contains type variables that cannot be generalized Just add a type constraint to your definition, or add an explicit interface file that defines the type of the queue. let q = (Queue.create() : int Queue.t);; Hope this helps Pierre Weis INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/ ------------------- 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