[
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: | Martin Jambon <martin_jambon@e...> |
| Subject: | Re: [Caml-list] Typing of the sequence operator (;) |
On Fri, 11 Nov 2005, Lukasz Stafiniak wrote: > Dear list, > > Why does the sequence operator (;) have type 'a -> 'b -> 'b and not > unit -> 'a -> 'a? There is (ignore) for doing "these things" > purposefully. The toplevel warning is very often mute. Together with > labels, this is a source of bugs. You can use the Camlp4 pa_ru.cmo module which adds type constraints in sequences, and is mentioned there: http://caml.inria.fr/pub/docs/manual-camlp4/manual002.html So something like that should work: ocamlopt -pp 'camlp4o pa_ru.cmo' yourfile.ml Martin -- Martin Jambon, PhD - http://martin.jambon.free.fr