[Haskell-cafe] Shrinking the Prelude: The "categorical" approach

Imam Tashdid ul Alam uchchwhash at yahoo.com
Tue Dec 19 22:53:35 EST 2006


hi guys,
I was just wondering if anyone is interested is a
"quasi"-project of rewriting the Prelude (only
shrinking it as measured by the total number of names
imported, read along...)
the idea is (just to be substantially different in
approach) to develop an "alternate history" of
Haskell.
take map for example, and fmap, I don't think they
should be named different (fmap is ugly, not
suggestive, and conceptually the same).
mplus could be renamed (++) (they are conceptually the
same, mzero looks odd, name it empty, or simply zero)
although I think concat should be replaced by msum (or
the other way around preferably :) ? msum is a bad
name) I am somewhat confused by join. concat seems to
match join's type but I don't think the ideas
coincide.
and so on. in particular, we would want:
* no backwards compatibility. the Prelude as is it, is
good enough. we are defining a new module.
* clean categorical hierarchy of type classes
(category theorists wanted!) promoting uniformity.
* cleaner names. foldl1 means nothing. absolutely
nothing. what's the 1 for?
* our Prelude only contains typeclasses, datatypes,
and functions of utmost conceptual (and semantic, such
as error, undefined and seq) importance, everything
else goes to other modules. our Prelude is not going
to be a place for "convenient" declarations.
* the suffix method of naming (liftM2) is considered
messy. we would prefer a seperate module (promoting
qualified import).
this is a fun project. we will not rewrite the
Prelude, we'll merely rename it. I would suggest the
name TheOtherPrelude to make our intentions clear. the
conveniences (like concatMap) goes to
TheOtherPrelude.Extension. I suggest we do it on the
wiki. anyone interested just open a page with your
name of choice. I am not doing it only because there's
no point doing it if no one's interested.
cheers,
Imam

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Haskell-Cafe mailing list