"ocaml_beginners"::[] using bolts camlp4 extension

View: New views
1 Messages — Rating Filter:   Alert me  

"ocaml_beginners"::[] using bolts camlp4 extension

by Sashan Govender :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

I'm trying to use the campl4 extension for bolt (http://bolt.x9c.fr/)
and find that I can't use string expressions but have to use string
literals.
For example this works:

let _ = Printf.sprintf "Some message" in
LOG "asdsa" LEVEL TRACE;

But this fails to compile:

  let s = Printf.sprintf "Some message" in
  LOG s LEVEL TRACE;

With this error:

Parse error: [expr level ;] expected after "in" (in [expr])
Preprocessing error on file BPlusTree.ml

How do I get around this?