[Haskell-cafe] Re: OO in Haskell

Keean Schupke k.schupke at imperial.ac.uk
Mon Nov 29 17:51:32 EST 2004

Benjamin Franksen wrote:

> Of course, stupid me. Ok, I changed that. Still won't compile. I post 
> only the
>first of four type errors (they are all about 40 lines long; note that the 
>inferred type below is almost longer than the complete test program).
You'd probably need this as well:

{-# OPTIONS -fglasgow-exts #-}
{-# OPTIONS -fallow-undecidable-instances #-}
{-# OPTIONS -fallow-overlapping-instances #-}


module SimpleOO where

import CommonMain hiding (HDeleteMany, hDeleteMany, TypeCast,typeCast)
import GhcSyntax
import GhcExperiments
import TypeEqBoolGeneric
import TypeEqGeneric1
import TypeCastGeneric1
import Label4
import Data.Typeable -- needed for showing labels
import Data.IORef
import GHC.IOBase

The source code for this and more examples is downloadable from: 
http://www.cwi.nl/~ralf/OOHaskell, The import list is quite long as this
using the HList library from the paper, which has different definitions
of TypeEq available etc... Overlapping instances are not required for
all definitions of type equality, just the generic ones.


More information about the Haskell-Cafe mailing list