Koen Claessen:
> Clearly, one would like to define the following default definition as
> well:
>
> negate x = 0 - x
Perhaps somebody noticed that already, but also for Fractional
objects (which I would love to see belonging to the Field class...)
one should have the default: x/y = x * re
On Fri, 6 Nov 1998, Christian Sievers wrote:
| This gives one more example of what I always wanted to suggest:
| The documentation of a class should clearly state which the minimal
| sets of definitions are that one has to give, rather than let the
| reader figure this out from the code.
Ind
> 1. The Show class
> ~~
[...]
> class Show a where
> showsPrec :: Int -> a -> ShowS
> show:: a -> String -- NEW
> showList :: [a] -> ShowS
>
> showsPrec
On Fri, 6 Nov 1998, Simon Peyton-Jones wrote:
> I have three small (and late) prelude/library proposals to add:
> 1. The Show class
> ~~
> * Add 'show' as a class method of class Show, to give:
> This breaks nothing (show has the same type as before), but it allows
> someone
I have three small (and late) prelude/library proposals to add:
1. The Show class
~~
One of the first things proposed when StdHaskell started
was to make it possible to make a type an instance of Show
by defining 'show' rather than by defining 'showsPrec'. More
elaborate things