Re: More about modules

From: Christophe Raffalli (Christophe.Raffalli@univ-savoie.fr)
Date: Fri Mar 17 2000 - 18:11:01 MET

  • Next message: Christophe Raffalli: "Re: Syntax for label (and more)"

    Xavier Leroy wrote:
    > - Inclusion of structures into larger structures (in the style of
    > "open" in SML): I agree this is desirable, and we already have the
    > syntax for it ("struct ... include S ... end"). It requires a little
    > more implementation work than exception renaming, so I'll probably do
    > it for 3.01.

    > Opinions?
    >
    > - Xavier Leroy

    I really agree: the include for structure you proposed is needed.

    But include Module with .... Is also really needed. Here is an example
    (not reallistic):

    module type Set =
            sig
                    type elt
            end
    
    module type Morphisme =
            sig
                    module E : Set
                    module F : Set
                    type elt = E.elt -> F.elt
            end

    module type Endomorphisme
            sig
                    include Morphisme with module E = F
            end

    I know you can allways find another way of writing. But this is much
    clearer with the "include .. with" !

    -- 
    Christophe Raffalli
    Université de Savoie
    Batiment Le Chablais, bureau 21
    73376 Le Bourget-du-Lac Cedex
    

    tél: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI



    This archive was generated by hypermail 2b29 : Fri Mar 17 2000 - 19:46:51 MET