caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Till Varoquaux" <till.varoquaux@gmail.com>
To: "Fabrice Marchant" <fabrice.marchant@orange.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] A functor to produce recursive modules ?
Date: Fri, 23 May 2008 23:02:06 +0100	[thread overview]
Message-ID: <9d3ec8300805231502r2211b972l849128ac4ab50478@mail.gmail.com> (raw)
In-Reply-To: <20080523214205.769b7788@orange.fr>

This is most definitely a bug in OCaml's type system. Ocaml is
amazingly robust but when you start using more exotic features bugs
occure ;-).

You should fill in a bug report at:
caml.inria.fr/mantis

Till
On Fri, May 23, 2008 at 8:42 PM, Fabrice Marchant
<fabrice.marchant@orange.fr> wrote:
>  However, even if the method is clear, I run into problems trying to apply it on these 2 recursive modules :
> map to sets and a set of map to sets.
>
> module F ( X : Set.OrderedType ) = struct
>  module rec Mod : sig
>    module XSet :
>      sig
>        type elt = X.t
>        type t = Set.Make( X ).t
>      end
>    module XMap :
>      sig
>        type key = X.t
>        type 'a t = 'a Map.Make( X ).t
>      end
>    type elt = X.t
>    type t = XSet.t XMap.t
>  end
>     =
>  struct
>    module XSet = Set.Make( X )
>    module XMap = Map.Make( X )
>
>    type elt = X.t
>    type t = XSet.t XMap.t
>  end
>  and ModSet : Set.S with type elt = Mod.t = Set.Make( Mod )
> end
>
> Got this internal message from ocaml 3.10.1 :
> "Fatal error: exception Assert_failure("typing/path.ml", 48, 22)"
>
> Maybe should the a' type be declared (as XSet.t) ?
>
> Any light ?
>
> Fabrice
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>



-- 
http://till-varoquaux.blogspot.com/


  reply	other threads:[~2008-05-23 22:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-22 20:58 Fabrice Marchant
2008-05-23  6:18 ` [Caml-list] " Alain Frisch
2008-05-23 18:00   ` Fabrice Marchant
2008-05-23 19:40   ` Fabrice Marchant
2008-05-23 19:42   ` Fabrice Marchant
2008-05-23 22:02     ` Till Varoquaux [this message]
2008-05-23 21:37       ` Fabrice Marchant
2008-05-23 22:25     ` Jeremy Yallop
2008-05-23 21:37       ` Fabrice Marchant

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=9d3ec8300805231502r2211b972l849128ac4ab50478@mail.gmail.com \
    --to=till.varoquaux@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=fabrice.marchant@orange.fr \
    /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;
as well as URLs for NNTP newsgroup(s).