From: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
To: Hendrik Tews <tews@os.inf.tu-dresden.de>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] functor substitution gives error
Date: Mon, 6 Sep 2010 11:39:20 +0200 [thread overview]
Message-ID: <AANLkTikXGkeY6Hd4FwHX2BeZOtF_mfgXDtOv==SbMMSO@mail.gmail.com> (raw)
In-Reply-To: <19588.45205.199003.965321@blau.inf.tu-dresden.de>
I think I just hit the same kind problem.
This doesn't compile :
----
module A : sig
type m
module M : sig
type t = m
end
end = struct
module M = struct
module S = String
module Smap = Map.Make(S)
type t = int Smap.t
end
type m = M.t
end
----
Type declarations do not match:
type t = int Smap.t
is not included in
type t = m
However if I put S outside M, or if I specify the type of Smap it compiles :
----
module A : sig
type m
module M : sig
type t = m
end
end = struct
module S = String
module M = struct
module Smap = Map.Make(S)
type t = int Smap.t
end
type m = M.t
end
----
----
module A : sig
type m
module M : sig
type t = m
end
end = struct
module M = struct
module S = String
module Smap = (Map.Make(S) : Map.S with type key = S.t)
type t = int Smap.t
end
type m = M.t
end
----
Daniel
next prev parent reply other threads:[~2010-09-06 9:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-06 9:12 Hendrik Tews
2010-09-06 9:39 ` Daniel Bünzli [this message]
2010-09-07 20:46 ` [Caml-list] " Jacques Garrigue
2010-09-07 10:48 ` Jacques Garrigue
2010-09-07 13:32 ` Hendrik Tews
2010-09-07 13:54 ` Daniel Bünzli
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='AANLkTikXGkeY6Hd4FwHX2BeZOtF_mfgXDtOv==SbMMSO@mail.gmail.com' \
--to=daniel.buenzli@erratique.ch \
--cc=caml-list@inria.fr \
--cc=tews@os.inf.tu-dresden.de \
/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