Browse thread
Writing Identity Functors (or Wrapper modules) in OCAML
-
Merijn de Jonge
- Julien Signoles
- Jean-Christophe Filliatre
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Julien Signoles <signoles@l...> |
| Subject: | Re: [Caml-list] Writing Identity Functors (or Wrapper modules) in OCAML |
> > module type IHelloWorld = > sig > type helloWorldType = Hello | World > val hello : unit -> helloWorldType > end > > module Wrapper (X: IHelloWorld) : IHelloWorld = > struct > type helloWorldType = X.helloWorldType > let hello = X.hello > end You have to explicitely define Hello and World in the wrapper. Try this : module Wrapper(X:IHelloWorld): IHelloWorld = struct type helloWorldType = X.helloWorldType = Hello | Word let hello = X.hello end Hope this helps, Julien Signoles -- mailto:Julien.Signoles@lri.fr ; http://www.lri.fr/~signoles "In theory, practice and theory are the same, but in practice they are different" (Larry McVoy)