[Haskell-cafe] OO Design in Haskell Example (Draft)

oleg at pobox.com oleg at pobox.com
Mon Feb 26 20:39:42 EST 2007


Steve Downey wrote:
> In the last OO design in Haskell thread (and probably in every one
> preceeding it), it was suggested that having some examples might be a good
> idea.
>
> Since most people with existing designs will have some familiarity with
> Design Patterns, and those are typical building blocks for OO designs, it
> occured to me that implementing some of them might be a useful
> excersize.

Have you looked at OOHaskell?
	http://homepages.cwi.nl/~ralf/OOHaskell/
	http://darcs.haskell.org/OOHaskell/

With the exception of pure-functional objects and binary methods, I
think we have considered almost every OO pattern/idiom we could find,
including nominal/structural subtyping, co- and contra-variance,
self-typing, etc. The DARCS repository contains the complete code for
all of the examples and patterns. To clarify, the point of OOHaskell
is to use Haskell as a tool, laboratory bench, for exploring various
(thorny) OO issues.


More information about the Haskell-Cafe mailing list