Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: CSL modules
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <xleroy@p...>
Subject: Re: CSL modules

> Being curious I tried this and got an error from CSL 1.14, which I
> really don't understand.

My code was wrong, I just confused the formal parameter "A" of the
functor with the global module "A". CSL just complains that these two
are not a priori the same module (when typing the body of the
functor).

What I should have written is:

module F(A: SIGA)(B: SIGB) =
  (struct
     type ta = A.ta
     type tb = B.tb
     let xa = A.xa
     let xb = B.xb
   end :
   sig
    type ta = A.ta              (* concrete *)
    type tb                     (* abstract *)
    val xa : ta
    val xb : tb
  end)
   
My apologies for the confusion.

- Xavier Leroy