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
module types and constraints in several layers
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-03-15 (14:48)
From: Chris King <colanderman@g...>
Subject: Re: [Caml-list] module types and constraints in several layers
On 3/15/07, Christian Sternagel <> wrote:
> module Make (Trs : TRS.T) : SOME.T = struct

This looks to be your problem... by specifying the type of Trs as
TRS.T, you are losing the information about the relation between the
types in the modules.  You can fix this by adding this relation to the
definition of TRS.T:

module type T = sig
 type t
 module Term: TERM.T
 module Fun : FUNCTION.T with type t = Term.Fun.t
 val f0 : t -> Fun.t Setx.set

Otherwise O'Caml presumes Term and Fun to be completely unrelated.

Hope this helps; module type constraints can get messy :)