Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Specialized functors
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: malc <malc@p...>
Subject: Re: [Caml-list] Specialized functors
On 30 Apr 2002, Christophe Raffalli wrote:

> Le mar 30/04/2002 à 09:12, malc a écrit :
> > Hi,
> > 
> > Here http://algol.prosalg.no/~malc/code/specfun.tar.gz you can find small
> > OCaml 3.04 patch to allow functor specialization. Feedback is welcome.
> > 
> 
> Can you tell us what it does (I prefer to know before I try)

module F(A: sig .. end) = struct
...
end

module X = F(Moo) will be expanded to:
module X = struct
  module opaque = struct
   <Moo body>
  end
  open X
  <F body>
end

With all the dirty facts hidden, and typing (mostly) preserved.
There is an example in the archive, try it, cause im really bad
doc/explanation writer.

-- 
mailto:malc@pulsesoft.com

-------------------
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