Re: [Caml-list] Constructors are not functions

2009-10-10 Thread Goswin von Brederlow
David Allsopp dra-n...@metastack.com writes: Goswin von Brederlow wrote: snip Then what about type t1 = Bar of int * int type t2 = Foo of (int * int) If you treat constructors as functions taking one argument then But why (so arbitrarily) do this? Because that was what the mentioned

[Caml-list] Cannot access module members as unqualified

2009-10-10 Thread rouanvd
Hi everyone. I am having trouble getting my modules to work together. I have 2 modules : module Preprocessor = struct let run txt = print_endline txt; txt ^ txt ;; end;; module Main = struct

Re: [Caml-list] Constructors are not functions

2009-10-10 Thread blue storm
On Tue, Oct 6, 2009 at 2:38 PM, Jon Harrop j...@ffconsultancy.com wrote: Can you not just say that Bar in an expression is a function (fun x - Bar x)? Ocaml has a recursive definition of values extension that make syntaxic distinctions between constructors and functions even in an expression

Re: [Caml-list] camlp5/revised syntax questions

2009-10-10 Thread blue storm
On Thu, Oct 8, 2009 at 4:39 PM, Aaron Bohannon bohan...@cis.upenn.edu wrote: Thanks for your detailed reply.  I had a suspicion I would have to read the source code to get the all of the necessary documentation. It is actually possible to pretty-print the grammar rules during camlp* execution.

Re: [Caml-list] Cannot access module members as unqualified

2009-10-10 Thread Richard Jones
On Sat, Oct 10, 2009 at 10:39:46AM +0200, roua...@softwarerealisations.com wrote: module Preprocessor = struct let run txt = print_endline txt; txt ^ txt ;; end;; [...] ocamlc -c

Re: [Caml-list] Improving OCaml's choice of type to display

2009-10-10 Thread Damien Guichard
As Ocaml modules are essentially ML modules, the MLton experience is certainly one to be carefully considered. People, please don't hesitate to elaborate about how (un-)happy you are with ML/MLton alternate type naming strategies. - damien En réponse au message de : Stephen Weeks du :