Improved documentation for Bool (Was: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt)

Derek Elkins derek.a.elkins at
Sun Jan 18 14:36:22 EST 2009

On Sun, 2009-01-18 at 18:17 +0100, Benja Fallenstein wrote:
> On Sun, Jan 18, 2009 at 5:48 PM,  <roconnor at> wrote:
> > I noticed the Bool datatype isn't well documented.  Since Bool is not a
> > common English word, I figured it could use some haddock to help clarify it
> > for newcomers.
> >
> > -- |The Bool datatype is named after George Boole (1815-1864).
> > -- The Bool type is the coproduct of the terminal object with itself.
> Russell, this does seem like it might be very helpful, but it might be
> useful to include a note about what category you are working in.
> People may sometimes naively assume that one is working in the
> category of Haskell/Hugs/GHC data types and Haskell functions, in
> which there are no terminal -- or initial -- objects 

The naive way of making a "Haskell" category doesn't even work.  Taking
objects to be Haskell types, all Haskell functions as arrows, arrow
equality being observational equality, and (.) and id to be the
composition and identity, you fail to even have a category.  Proof of
this is left as an (easy) exercise for the reader.

More information about the Haskell-Cafe mailing list