From: Nicolas Ollinger <nollinge@ens-lyon.fr>
To: Jean-Yves Moyen <guest10@diku.dk>
Cc: caml-list@inria.fr
Subject: Re: probleme dans les modules - contraintes (fwd)
Date: Mon, 2 Aug 1999 11:39:14 +0200 (MET DST) [thread overview]
Message-ID: <Pine.GSO.4.10.9908021129080.13281-100000@woodstock> (raw)
In-Reply-To: <Pine.HPP.3.95.990802112827.10313A-100000@freja.diku.dk>
On Mon, 2 Aug 1999, Jean-Yves Moyen wrote:
(snip)
> provoque a la compilation l'erreur "This module type is not a signature"
> sur la chaine "Toto". (Je n'ai pas trouve la description de cette erreur
> dans le refman, ni dans les FAQ)
(snip)
> et apparamment, au vu de la grammaire telle qu'indiquee dans le refman,
> les 3 versions devraient passer.
> A quoi est du le probleme, et comment faire pour le corriger ?
En effet, cela ressemble fortement a un bug. Apres avoir regarde un peu
le source, le probleme survient dans Typemod.extract_sig. Cette fonction
appelle Mtype.scrape qui remplace Toto par Titi si on a fait la
declaration :
module type Toto = Titi;;
Or, extract_sig s'attend a recevoir une signature et non un nom de
module...
Voici un petit patch rapide... comme je ne connais pas les details du
compilateur il y a peut-etre des effets de bord indesirables...
dans ocaml-2.02/typing/mtype.ml remplacer scrape par :
let rec scrape env mty =
match mty with
Tmty_ident p ->
begin try
match Env.find_modtype_expansion p env with
Tmty_ident p -> scrape env (Tmty_ident p)
| mty -> mty
with Not_found ->
mty
end
| _ -> mty
J'ai verifie que ca compile... pas que ca marche... :)
Nb: apparement ca a avait ete prevu car scrape est definie deja
recursive...
Nicolas.
--
parent reply other threads:[~1999-08-12 10:05 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <Pine.HPP.3.95.990802112827.10313A-100000@freja.diku.dk>]
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.GSO.4.10.9908021129080.13281-100000@woodstock \
--to=nollinge@ens-lyon.fr \
--cc=caml-list@inria.fr \
--cc=guest10@diku.dk \
/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