Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] strange behaviour of ocamldoc
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Radu Grigore <radugrigore@g...>
Subject: Re: [Caml-list] Confused
On Wed, 15 Sep 2004 14:28:53 +0100, Jon Harrop <jon@jdh30.plus.com> wrote:
 
> How come this works: [...]
> But this does not:
> 
> # let rec build = function 0 -> [] | n -> 1e-6 :: build (n-1) in
>   let test = 1. :: build 1000;;
> Syntax error
 
Look at this. I'm even more confused:

----------------
[rgrig@radugrigore temp]$ ocaml
        Objective Caml version 3.07+2

# #load "camlp4r.cma";;
        Camlp4 Parsing version 3.07+2

# let rec b = function 0 -> [] | n -> 2. :: b (n - 1) in let t = 1. :: b 2;;
Toplevel input:
# let rec b = function 0 -> [] | n -> 2. :: b (n - 1) in let t = 1. :: b 2;;
                         ^^
Parse error: 'and' or 'in' expected (in [expr])
# exit 0;;
Toplevel input:
# exit 0;;
        ^^
Parse error: ';' expected after [str_item] (in [phrase])
#
------------------

regards,
 radu

-------------------
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