[Haskell-cafe] Why the Prelude must die

Claus Reinke claus.reinke at talk21.com
Sun Mar 25 11:32:41 EDT 2007

> Vivian McPhail wrote:
>> What I want to push is a 'mathematically sound' numeric prelude.  A proper
>> numerical prelude should have bona fide mathematical obects like groups,
>> rings, and fields underlying common numerical classes.  
> Some classes would become even more important: monoid, groupoid, 
> semi-group, loop (semi-group with identity), etc.  But all of those are, 
> to the average programmer (and many a mathematician), just as scary as 
> Monad.

as long as those concepts, like monads, are clearly defined, consistent, and
have practical uses that directly correspond to those concepts and fulfill the
laws associated with them, that should not be a hindrance.. ;)

ok, tongue out of cheek again, someone would need to investigate the 
particular shape in which such abstract concepts would be most useful
(which may or may not be the same shape best known in maths, see
Monad, Monoid, Applicative, Arrow,..), and how those shapes are best 
expressed within the programming language abilities. and then, of course, 
someone would need to write code and tutorials.

i know there has been a lot more than just talk wrt numeric preludes for 
haskell, but just now, it took me a while to find the main incumbents, and
i could easily have been put off track by other mathematical libraries. when
i found that mathematical prelude discussion page at haskell.org, it was 
disappointingly brief, so i might not have followed through to the sources,
which seem rather better developed. when i did go to the darcs site for
the sources, there were haddocks, but for introduction and overview, 
there is only a brief entry for the haskell communities report, in .tex format.

perhaps i was mistaken in thinking that there is a group of math-interested
haskellers out there discussing, developing, and documenting the area? or
perhaps that group needs introductory tutorials presenting its work?

long ago, there was a start in Jeroen Fokker's
    Explaining Algebraic Theory with Functional Programs.
    FPLE 1995

but what would be today's updated equivalent?


-- one of the secret commands of haskellbot; when uttered on one of the 
    channels haskellbot is lurking on (mailing lists, news groups, irc, blogs, 
    feeds,..), it will generally result in yet another monad tutorial (YAMT) 
    to be written and published; although, if haskellbot is bored, it might 
    simply point randomly to one of its earlier works; documentation on 
    haskellbot commands is sketchy, possibly to discourage trolls, but it
    has been known to react to "oop in haskell", "killer application", 
    "mainstream", "static vs dynamic typing", and "category theory"

More information about the Haskell-Cafe mailing list