Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Assert fail in partial application
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Assert fail in partial application
On Thu, Jun 10, 2004 at 11:15:54AM +0200, Diego Olivier Fernandez Pons wrote:
>     Bonjour,
> 
> > You might try to code [...]
> 
> My question wasn't correctly formulated. What I want is :
> 
> #if defined DEBUGMODE
> let f = function x -> ... [explicit partial application]
> #else
> let f = fun x y -> ...
> #endif

You can preprocess with cpp, or camlp4's pa_ifdef.

See this example:

http://pauillac.inria.fr/~aschmitt/cwn/2003.09.02.html#4

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
"One serious obstacle to the adoption of good programming languages is
the notion that everything has to be sacrificed for speed. In computer
languages as in life, speed kills." -- Mike Vanier

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners