You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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'.
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
The text was updated successfully, but these errors were encountered: