Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Strategy to avoid name collision in signatures
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: michael.le_barbier@l...
Subject: Re: [Caml-list] Strategy to avoid name collision in signatures
Andrej Bauer <> writes:

> If you really want to "blend" together OrderedType and FunnyType in the
> same module, then they must be meaningfully related. What example do you
> have in mind?

A real example is where FunnyType.Make will add conveniance functions
to a ring structure (math rings). Let's say FunnyType.PROTO defines

  one: t
  zmul: int -> t ->t

FunnyProto.Make will add few functions to this interface, e.g.

  mone: t (= zmul (-1) one)
  two: t (= zmul 2 one)

All the best,
Michaël LB