[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Judicael Courant <Judicael.Courant@l...> |
| Subject: | Re: Strange type error |
Claudio Sacerdoti Coen a écrit :
>
> Hello,
>
> let a.mli be
>
> type 'a section_path = { x : int; }
> and mind_section_path = [ `MIND] section_path
> type const_section_path = [ `CONST] section_path
[...]
> for a.mli I get
>
> File "prova.mli", line 3, characters 26-35:
> This type [ `CONST] should be an instance of type [ `MIND]
>
> that seems nonsense to me. Someone could explain the error?
>
I had a similar problem some time ago. This strange behavior of O'Caml
3.00 was corrected in the CVS version:
------------------------------------------------------
Objective Caml version 3.00
# type 'a section_path = { x : int; }
and mind_section_path = [ `MIND] section_path
;;
type [ `MIND] section_path = { x : int; } constraint [ `MIND] = [
`MIND]
type mind_section_path = [ `MIND] section_path
#
------------------------------------------------------
Objective Caml version 3.00+8 (2000-06-30)
# type 'a section_path = { x : int; }
and mind_section_path = [ `MIND] section_path
;;
type 'a section_path = { x : int; }
type mind_section_path = [ `MIND] section_path
#
------------------------------------------------------
Judicaël.
--
Judicael.Courant@lri.fr, http://www.lri.fr/~jcourant/
(+33) (0)1 69 15 64 85
"Montre moi des morceaux de ton monde, et je te montrerai le mien"
Tim, matricule #929, condamné à mort.
http://rozenn.picard.free.fr/tim.html