caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Haskell class type simulation
@ 2002-11-21 21:13 Johan Baltié
  2002-11-21 21:45 ` kahl
  0 siblings, 1 reply; 2+ messages in thread
From: Johan Baltié @ 2002-11-21 21:13 UTC (permalink / raw)
  To: caml-list

Hi !

I'm currently looking for a way to simulate  the Haskell "class type" notion 
in OCaml i.e. the same kind of :

class Eq a where
    (==), (/=) :: a -> a -> Bool

class (Eq a) => Ord a where
    compare                :: a -> a -> Ordering
    (<), (<=), (>=), (>)   :: a -> a -> Bool
    max, min               :: a -> a -> a

For me it's a bit like module signature with an abstract type and an 
"extending" semantic and a type constraint.

Any hint ?
-- 
Ciao

Jo

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-11-21 21:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-21 21:13 [Caml-list] Haskell class type simulation Johan Baltié
2002-11-21 21:45 ` kahl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).