[Haskell-cafe] Phantoms

Henning Thielemann lemming at henning-thielemann.de
Fri Aug 15 03:24:07 EDT 2008


On Fri, 15 Aug 2008, Jules Bean wrote:

> Malcolm Wallace wrote:
>> Andrew Coppin <andrewcoppin at btinternet.com> wrote:
>> 
>>>> instnace Show (Foo Int) ...
>>>> instnace Show (Foo Double) ...
>>>> 
>>> ...WHY did I not think of this myself? o_O
>> 
>> Because it is not Haskell'98?  It requires {-# LANGUAGE 
>> OverlappingInstances #-}
>
> No it doesn't?
>
> It requires the much more semantically simple -XFlexibleInstances, as far as 
> I know.
>
> Overlapping would only be needed if there was also a polymorphic instance on 
> Foo a?

Btw. was anything bad about the suggested Haskell98 solution?


More information about the Haskell-Cafe mailing list