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
Intended behavior of GenerateMap
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-06-08 (08:36)
From: Christian Stork <caml-list@c...>
Subject: Intended behavior of GenerateMap

Is my understanding correct that running "camlp4of -filter map ..." over

    class map = Camlp4Filters.GenerateMap.generated

will produce a map class for *all* types defined in the current file --
irrespective if the types are incapsulated in a module (which is then
used for the Camlp4Trash trick)?

Wouldn't it be much nicer, i.e., more economical and more precise, if
the above only produces a map class for the most recently defined type
/ mutually recursive types?   

Just wondering,

PS: I came to the above question after reading the source and some
experimentation.  Is there any place where the rationale behind
GenerateMap/Fold is explained?

Chris Stork   <>  Support!  <>
OpenPGP fingerprint:  B08B 602C C806 C492 D069  021E 41F3 8C8D 50F9 CA2F