[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Hendrik Tews <tews@i...> |
| Subject: | Re: Problem binding type parameters in modules |
Hi,
My problem (example code):
[omitted]
What about using abstraction? eg
module type FOO1 =
sig
type 'a foo
val empty : unit -> 'a foo
end
module Bar : FOO1 =
struct
type 'a foo = 'a list Lazy.t
let empty () = lazy []
end
Then empty is a function and its type gets generelized.
The "'a" specified in "empty" is still not the same as in "'a foo". I have
The section about type checking in the list of "Frequently asked
Questions about Caml"
(http://caml.inria.fr/FAQ/FAQ_EXPERT-eng.html) explains the
differences between 'a and '_a.
Bye,
Hendrik