In the table of Prelude operators (p. 53) the operator :% is
listed, this operator is not (and should not be) exported
from the Prelude, and should be removed from the table.
-- Lennart
The Haskell library seems to be contain few entries
(none to be exact), so I've decided to add something.
On animal.cs.chalmers.se I've placed two very simple,
but useful modules. One implements a random number
generator (a very good one; I didn't design it), and
the other a sorting function tha
Lennart Augustsson writes:
The Haskell library seems to be contain few entries
(none to be exact), so I've decided to add something.
...
Actually, I've put the Haskell-y bits from Stephen Bevan's archive
into the library here at Glasgow
(ftp.dcs.glasgow.ac.uk:^ftp/pub/haskell/lib
The 1.2 preface says that type synonyms are exported with "T..",
shouldn't that be "T(..)"?
-- Lennart
I think the suggestion Joe has made about division is good,
but I also think it is overkill!
Let's not add even more things to the Prelude that are not
going to be used. My opinions on this matter is:
- have something which is efficiently implementable
(i.e. close to what the
Joe,
Your definition of divFloorRem (and probably divCeilingRem as well)
doesn't seem to be quite right, because I end up with
(-4) `mod` (-3) == -4
because divTruncateRem (-4) (-3) is (1,-1).
The condition in the "if" should be something like
signum r == -signum d
rather than r<
Thanks Joe! I still don't know why anyone would want
the 'divTruncateRem' function and its derivatives, but ok,
leave them there. Why not add division with "rounding"
AWAY from zero as well. :-)
/kent k
(I've sent some detail comments directly to Joe.)
|Your definition of divFloorRem (and probably divCeilingRem as well)
|doesn't seem to be quite right, because I end up with
| (-4) `mod` (-3) == -4
|because divTruncateRem (-4) (-3) is (1,-1).
|
|The condition in the "if" should be something like
| signum r == -signum d
|rather than r<
| Well, here's another problem I've encountered. Consider this module:
|
| module M(T) where
| data T = T
|
| Is this legal? Clearly I am just trying to export the type T, but it happens
| that the type has a constructor with the same name. Naming a constructor
| in the export list
Well, here's another problem I've encountered. Consider this module:
module M(T) where
data T = T
Is this legal? Clearly I am just trying to export the type T, but it happens
that the type has a constructor with the same name. Naming a constructor
in the export list is explic
10 matches
Mail list logo