Instances for data types

Benjamin Franksen benjamin.franksen at
Sat May 1 22:25:08 EDT 2004

On Friday 30 April 2004 21:09, S. Alexander Jacobson wrote:
> And (going slightly OT) as long we are are
> simplifying instance declarations, how about
> making it easier to specialize them?  
> ...
> I'd like to
> declare default implementations e.g.
>    instance Property BasicProp a where
> And then only if I have a more interesting type
> do:
>    instance Property BasicProp CoolType where
> And only define the functions that are different
> from the default behavior for (Propry BasicProp a)

AFAIK, with overlapping and undecidable instances enabled (via compiler 
switch) this is already possible in GHC.


More information about the Libraries mailing list