[Haskell-beginners] Re: Apparent bug

Tobias Brandt tob.brandt at googlemail.com
Tue Nov 16 13:27:55 EST 2010

On 16 November 2010 19:17, Edward Z. Yang <ezyang at mit.edu> wrote:
> It seems to me that there is a possibility we could reify some information
> that is traditionally specified in the documentation: that is, what
> functions must be defined by a minimal instance, which could then give
> GHC enough information to give meaningful warnings if not all functions
> for a minimal instance are proviced.

One could use a compiler pragma the defines possible sets of minimal
definitions, e.g.
{-# MINIMAL_DEF Num ((+),(*),abs,signum,fromInteger,(-)),
((+),(*),abs,signum,fromInteger,negate) #-}

one could even add logical notation, like:
{-# MINIMAL_DEF Num ((+), (*), abs, signum, fromInteger, (-) || negate) #-}

More information about the Beginners mailing list