Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] OCaml popularity
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Garrigue <garrigue@k...>
Subject: Re: Module recursion (Was Re: [Caml-list] Re: Haskell-like syntax)

> Of the two issues you bring up, I think having the ability to have mutually 
> recursive functions across module boundaries is *by far* more important than 
> the ability to spread types across module boundaries. We can sort of do it 
> now, with references, but we have the same problem as with theworkaround I 
> mentioned for "where": reduced polymorphism. 

Not so since 3.05: you have to be explicit, but you can define
polymorphic mutable values.
type id = { mutable id: 'a. 'a -> 'a }
let id = { id = fun _ -> failwith " not defined yet" }
... 1, true
let () = <- (fun x -> prerr_endline "Got you!"; x)

Hope this helps,


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: