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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-05-13 (15:58)
From: Isaac Freeman <memotype@g...>
Subject: camlp4 and streams

I am having some problems using streams in my camlp4 extentions. The code:

  expr: LEVEL "expr1"
    [[ "yield"; e1 = expr LEVEL "simple";
       "continue"; e2 = expr LEVEL "simple" ->
          <:expr< [< $e1$; $e2$ >] >> ]];

produces the error:

isaac@lappy:~/stuff/ocaml$ ocamlc -pp "camlp4o pa_extend.cmo
q_MLast.cmo" -I +camlp4 -c
File "", line 8, characters 18-20:
While expanding quotation "expr":
Parse error: illegal begin of expression
Uncaught exception: Pcaml.Qerror("expr", 1, _)
Preprocessor error

However, when I change the stream into a list, it works fine, so I'm
sure there is just some technicality in using streams here that I'm
not accounting for properly. Any ideas?


James "Isaac" Freeman
memotype (at)