[Haskell-cafe] instance of String illegal
Bernie Pope
bjpop at csse.unimelb.edu.au
Thu Sep 28 23:01:33 EDT 2006
On 29/09/2006, at 12:44 PM, Donald Bruce Stewart wrote:
>
> Alternatively, use -fglasgow-exts :)
>
>> instance Foo String where
>> mkFoo = id
>
> $ ghci -fglasgow-exts A.hs
> *Main> mkFoo "foo"
> "foo"
>
And just to follow up what Don said, this feature of GHC is described
here:
http://www.haskell.org/ghc/docs/latest/html/users_guide/type-
extensions.html
More information about the Haskell-Cafe
mailing list