Version française
Home     About     Download     Resources     Contact us    
Browse thread
Strange type error
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Claudio Sacerdoti Coen <sacerdot@s...>
Subject: Strange type error
 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

 and b.mli be

 type 'a section_path = { x : int; }
 type mind_section_path = [ `MIND] section_path
 type const_section_path = [ `CONST] section_path

 b.mli is compiled without problems, but 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?

 						Thanks,
						C.S.C.

-- 
----------------------------------------------------------------
Real name: Claudio Sacerdoti Coen
Graduate Computer Science Student at University of Bologna
Now at INRIA (Rocquencourt)
E-mail: sacerdot@cs.unibo.it
        Claudio.Sacerdoti_Coen@inria.fr
http://caristudenti.cs.unibo.it/~sacerdot
----------------------------------------------------------------