[Haskell-cafe] Class

Bulat Ziganshin bulat.ziganshin at gmail.com
Fri Nov 3 05:23:21 EST 2006

Hello Slavomir,

Thursday, November 2, 2006, 9:59:38 PM, you wrote:

>> one is okay, though, but you have to start ghc with
>> -fallow-undecidable-instances and -fglasgow-exts I'm afraid.

> Thanks, Sebastian. That was helpful. Are there any papers on the subject?

i recommend you to read in the following sequence:

1) The paper that at first time introduced type classes and their
implementation using dictionaries was Philip Wadler and Stephen Blott
"How to make ad-hoc polymorphism less ad-hoc"

2) http://haskell.org/haskellwiki/OOP_vs_type_classes

3) Ralf Lammel and Klaus Ostermann paper
"Software Extension and Integration with Type Classes"
(http://homepages.cwi.nl/~ralf/gpce06/) which prompts me to start
thinking about differences between OOP and type classes instead of
their similarities   

4) ghc user's guide, chapter 7 describes Haskell language extensions

5) You can find more papers on the
http://haskell.org/haskellwiki/Research_papers/Type_systems#Type_classes page.
Of those papers i found a most interesting "exporing the design space"

6) The best paper on type level arithmetic using type classes i've seen
is "Faking it: simulating dependent types in Haskell"
( http://www.cs.nott.ac.uk/~ctm/faking.ps.gz )

7) The great demonstration of type-level arithmetic is TypeNats package
which "defines type-level natural numbers and arithmetic operations on
them including addition, subtraction, multiplication, division and GCD"
( darcs get --partial --tag '0.1' http://www.eecs.tufts.edu/~rdocki01/typenats/ )

8) I should also mention here Oleg Kiselyov page on class-based type-level
programming in Haskell: http://okmij.org/ftp/Haskell/types.html

Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com

More information about the Haskell-Cafe mailing list