Re: Two prelude/library matters

1998-11-09 Thread Jerzy Karczmarczuk
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

Re: Two prelude/library matters

1998-11-06 Thread Koen Claessen
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

Re: Two prelude/library matters

1998-11-06 Thread Christian Sievers
> 1. The Show class > ~~ [...] > class Show a where > showsPrec :: Int -> a -> ShowS > show:: a -> String -- NEW > showList :: [a] -> ShowS > > showsPrec

polymorphism and lists (was Re: Two prelude/library matters)

1998-11-06 Thread S. Alexander Jacobson
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

Two prelude/library matters

1998-11-06 Thread Simon Peyton-Jones
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