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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-04-02 (13:20)
From: Joel Reymont <joelr1@g...>
Subject: camlp4: Curried constructor error

I have a the following function and invocation:

let render = <:octalfile<templ.html>>

print_endline (Xml.to_string_fmt (Templ.render ~page ~visitor));;

I thought I would make render take an argument so I first tried

let render x = <:octalfile< x >>

print_endline (Xml.to_string_fmt (Templ.render "templ.html" ~page  

File "", line 31, characters 34-46:
This function is applied to too many arguments,
maybe you forgot a `;'

I thought I would make render take a couple more arguments

let render x y z = <:octalfile< x >> y z

but this complains

File "ghost-location", line 1, characters 0-0:
Parse error: currified constructor

What's the proper way to make render take a file name?

	Thanks, Joel