-fallow-incoherent-instances
Christian Maeder
maeder at tzi.de
Tue Nov 30 07:10:34 EST 2004
I wrote:
> If, furthermore, the "confusing instance" is commented out, the source
> even compiles without extensions.
Correction: -fglasgow-exts is still required for the type
GeneralBreakFn, but -fallow-overlapping-instances can be omitted.
> {-# OPTIONS -fglasgow-exts -fallow-overlapping-instances -fallow-undecidable-instances -fallow-incoherent-instances #-}
> module InCoherentInst where
>
> import Control.Exception(throwDyn)
>
> import Data.Typeable(Typeable)
>
> class Confuse a where
> confuse :: a -> String
>
> instance Confuse a => Typeable a
>
> data GeneralBreakFn a = GeneralBreakFn (forall b . a -> b)
>
> addGeneralFallOut :: Typeable a => GeneralBreakFn a
> addGeneralFallOut =
> let breakFn a = throwDyn (GeneralFallOutExcep a)
> in GeneralBreakFn breakFn
>
> data GeneralFallOutExcep a = GeneralFallOutExcep a deriving (Typeable)
More information about the Glasgow-haskell-users
mailing list