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 ou message d'erreur peu explicite ? #8235

Closed
vicuna opened this issue Jul 29, 2003 · 2 comments
Closed

bug ou message d'erreur peu explicite ? #8235

vicuna opened this issue Jul 29, 2003 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Jul 29, 2003

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

Bug description

Bonjour,

étonnamment simple et je ne saurais quoi dire si mes élèves tombent dessus:

bug.ml:
type t = float
type t' = { x : t }

bug.mli: (généré par ocamlc -i)
type t = float
and t' = { x : t }

sepia[137]% ocamlc bug.mli
sepia[138]% ocamlc bug.ml
The implementation bug.ml does not match the interface bug.cmi:
Type declarations do not match:
type t' = { x : t; }
is not included in
type t' = { x : t; }
sepia[139]% ocamlc -v
The Objective Caml compiler, version 3.07+beta 1
Standard library directory: /usr/local/lib/ocaml

--Pascal

@vicuna
Copy link
Author

vicuna commented Aug 1, 2003

Comment author: administrator

From: brisset@recherche.enac.fr

etonnamment simple et je ne saurais quoi dire si mes eleves tombent dessus:

bug.ml:
type t = float
type t' = { x : t }

bug.mli: (genere par ocamlc -i)
type t = float
and t' = { x : t }

C'est la combinaison de deux problemes. D'une part ocamlc -i ne
produit pas toujours une interface correct (ici il ne faudrait pas de
"and"). D'autre part, la representation des enregistrement de
flottants differe de celle des enregistrements normaux, mais le type
d'un champ n'est reconnu que si il a ete' defini auparavant (donc sans
recurrence).

Les deux sont solubles, avec differents niveaux de difficulte'. Il
faut juste se mettre d'accord sur ce qu'on fait. Xavier?
A` remarquer cependant que le probleme des champs flottants peut aussi
apparaitre avec les types abstraits:

a.ml
type t = float
type t' = { x : t }

a.mli
type t
type t' = { x : t }

La combinaison ci-dessus n'est pas acceptee, et ce n'est pas un bug.
Je ne crois pas que ce soit documente'.

Jacques

@vicuna
Copy link
Author

vicuna commented Jun 12, 2004

Comment author: administrator

Printing of "rec" in signatures improved 2004-06-12 by XL.

@vicuna vicuna closed this as completed Jun 12, 2004
@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