How your function eval_string:
let eval_string s = Camlp4.Struct.Token.Eval.string ~strict:() s
actually modifies a string?
--
Paolo
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archiv
Martin Potier wrote:
> I'd like to know if there is a way to retrieve a typped AST from Caml.
The function read_type_exp : string -> Typedtree.expression
takes a string of OCaml code, parses it, typechecks and returns the
typed tree. For example, evaluating
let test1 = read_type_exp "let x = 21
Paolo Donadeo wrote:
How your function eval_string:
let eval_string s = Camlp4.Struct.Token.Eval.string ~strict:() s
actually modifies a string?
It does the opposite of String.escaped [1]
[1] http://caml.inria.fr/pub/docs/old-311/libref/String.html
_
Jacques Carette writes:
> Nice trick - but my 'problem' [1] regards arbitrary valid OCaml code
> and how to serialize code values. The issue seems to be that one
> needs to attach an arbitrarily large typing environment to each part
> of a value, as there is no global typing environment which wi
It is actually not the case that type structure items can be shadowed :
# module A = struct type t = int;; type t = int end;;
Error: Multiple definition of the type name t.
Names must be unique in a given structure or signature.
___
Caml-list mail
bluestorm wrote:
It is actually not the case that type structure items can be shadowed :
# module A = struct type t = int;; type t = int end;;
Error: Multiple definition of the type name t.
Names must be unique in a given structure or signature.
Exactly. My desired would be for this n
I've observed the following gc crash with my ocaml (3.11.2) application, after
attempting to implement a memory-flushing routine with Gc.create_alarm:
Program received signal SIGSEGV, Segmentation fault.
0x007c15a7 in caml_fl_allocate (wo_sz=) at
freelist.c:171
171 freelist.c: No suc