Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG ocaml 2.04 #2443

Closed
vicuna opened this issue Apr 28, 2000 · 2 comments
Closed

BUG ocaml 2.04 #2443

vicuna opened this issue Apr 28, 2000 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Apr 28, 2000

Original bug ID: 105
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

J'obtient une erreur Stack overflow au moment de la compilation du fichier
f3.ml. A vue de nez, le problème semble venir d'une mauvaise gestion des
contextes des expressions << with type t >> dans les fichiers .mli. La
compilation se passe sans problèmes des que je renomme le type F2.t ou que
j'inline le fichier f1.mli dans f2.mli.

  • J'utilise le compilo ocaml-2.04 sous SunOS 5.6

  • J'avais déjà rencontré ce problème avec un version antérieur d'ocaml (sans
    doute 2.02). Je n'ai pas encore testé la 3.00.

    Yann Coscoy

PS: Je tiens à l'homonymie de type. 95% de mes types s'appellent t.

----- Fichier f1.mli
module type A =
sig
type t
val f : t
end

module type B =
sig
type t
val f : t
end

----- Fichier f2.mli
type t

module A : F1.A with type t = t
module B : F1.B with type t = t


----- Fichier f3.ml

F2.A.f = F2.B.f


----- Fichier Makefile
test:
ocamlc -c f1.mli
ocamlc -c f2.mli
ocamlc -c f3.ml



Yann Coscoy
Informatique CDC - Direction des Techniques Avancées
4, rue Berthollet
94110 Arcueil
Tél. : 01 40 49 15 28
Fax. : 01 40 49 15 78
e-mail : Yann.Coscoy@icdc.caissedesdepots.fr

@vicuna
Copy link
Author

vicuna commented May 16, 2000

Comment author: administrator

J'obtient une erreur Stack overflow au moment de la compilation du fichier
f3.ml. A vue de nez, le probl=E8me semble venir d'une mauvaise gestion des
contextes des expressions << with type t >> dans les fichiers .mli. La
compilation se passe sans probl=E8mes des que je renomme le type F2.t
ou que j'inline le fichier f1.mli dans f2.mli.

En effet, c'est un bug dans une operation de substitution sur les types
de modules, qui conduit dans certain cas a la creation d'abreviations
de types cycliques type t = t, qui font boucler le typage.

Le bug est corrige dans la version de travail d'OCaml.

Merci d'avoir signale le probleme.

  • Xavier Leroy

@vicuna
Copy link
Author

vicuna commented May 16, 2000

Comment author: administrator

Fixed on 2000-05-16 by Xavier. Same bug as #2453.

@vicuna vicuna closed this as completed May 16, 2000
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant