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

Sterling Clover s.clover at
Sun Jan 18 12:32:17 EST 2009

This is a great effort, but the root of the problem isn't just poor  
documentation, but an insistence on some obscure name. How about  
renaming Bool to YesOrNoDataVariable? I think this would help novice  
programmers a great deal.

It would also make the documentation flow much more naturally:

The Bool type is the coproduct of the terminal object with itself.


The YesOrNoDataVariable is the coproduct of the terminal object with  

--Oh! Of course!


On Jan 18, 2009, at 12:17 PM, 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 ('undefined' and
> 'const undefined' are distinct maps between any two objects X and Y),
> or else in the similar category without lifted bottoms, in which the
> empty type is terminal and the unit type isn't ('undefined' and 'const
> ()' are both maps from any object X to the unit type). These niceties
> will not confuse the advanced reader, but it may help the beginner if
> you are more explicit.
> - Benja
> P.S. :-)
> _______________________________________________
> Libraries mailing list
> Libraries at

More information about the Haskell-Cafe mailing list