Version française
Home     About     Download     Resources     Contact us    
Browse thread
Functional unparsing
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Andrey Riabushenko <cdome@b...>
Subject: Re: [Caml-list] Functional unparsing
> The Batteries Print module and associated syntax extension may be a
> useful base for implementing something similar to what you are
> proposing:
>
> http://git.ocamlcore.org/cgi-bin/gitweb.cgi?p=batteries/batteries.git;a=blo
>b_plain;f=src/core/extlib/print.ml;hb=HEAD and
> http://git.ocamlcore.org/cgi-bin/gitweb.cgi?p=batteries/batteries.git;a=tre
>e;f=src/syntax/pa_strings;hb=HEAD
>
> This allows for syntax like:
> Print.printf p"This is a list of integers: %{int list}"
> to return:
> int list -> unit = <fun>
>

Thank you, this one was much more helpful then standard printf.ml. This one is 
much shorter and easier to understand.