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
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: tmp123@m...
Subject: dml

In order to have an "eval" function, I'm trying to compile "dml".

Two problems have appeared up to now. For the first one I've solution, 
but not for the second one. Any help will be welcome.

The first problem has appeared in the "configure" file of this package. 
The result of "ocaml -v" is "3.10.0". When "configure" executes the line:

OCAML_MINOR=$(echo $OCAMLVER | cut -d '.' -f 2)

the variable takes a vlue of "0", instead of "10".

The problem can be skip changing the previous line to:

OCAML_MINOR=$(echo $OCAMLVER | cut -d '.' -f 2)

2) When executing "make", the following error appears:

ocamlc -pp \
         "camlp4 -I /usr/local/lib/ocaml/camlp4 pa_o.cmo pa_extend.cmo 
q_MLast.cmo pr_dump.cmo -impl " \
         -I /usr/local/lib/ocaml/camlp4 -I ../rtcg  -c -impl dml.ml4

File "dml.ml4", line 82, characters 56-65:
While expanding quotation "expr" in a position of "expr":
   Parse error: [ctyp] expected after "(" (in [ctyp])

where the related line is the line "Some s -> ..." of:

let build_patt_fun loc body = function
     SimplePatt (Some id) ->
       <:expr< fun $lid:id$ -> $body$ >>
   | SimplePatt None ->
       <:expr< fun _ -> $body$ >>
   | TuplePatt l ->
       let tuple_id, new_body, typ = gen_tuple_patts loc body l in
       (match tuple_id with
         None ->  <:expr< fun _ -> $body$ >>
       | Some s -> <:expr< fun ( $lid:s$ : Rtcg.code ($list:typ$))
           -> $new_body$ >>)

No idea of where is the error here.

Thanks a lot.