From: Julien Signoles <signoles@lri.fr>
To: Merijn de Jonge <merijn.de.jonge@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Writing Identity Functors (or Wrapper modules) in OCAML
Date: Mon, 27 Feb 2006 16:04:53 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.58.0602271600200.14206@pc9-159> (raw)
In-Reply-To: <f40e02a60602270649w5959ac06ldf2bf1f9820bbb72@mail.gmail.com>
>
> 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)
next prev parent reply other threads:[~2006-02-27 15:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-27 14:49 Merijn de Jonge
2006-02-27 15:04 ` Julien Signoles [this message]
2006-02-27 15:13 ` [Caml-list] Writing Identity Functors (or Wrapper modules) inOCAML Sebastian Egner
2006-02-27 15:20 ` Merijn de Jonge
2006-02-27 15:06 ` [Caml-list] Writing Identity Functors (or Wrapper modules) in OCAML Jean-Christophe Filliatre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.58.0602271600200.14206@pc9-159 \
--to=signoles@lri.fr \
--cc=caml-list@yquem.inria.fr \
--cc=merijn.de.jonge@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox