Tuesday, September 29, 2009

Haskell number system in one picture

As part of an introduction into the number systems of Haskell 98, I drew an overview in an attempt to capture the chaos. Later on, I gave up on the text, but the picture might still be a useful reference for some programmers. I think, that all mathematical functions are present, for the string conversions (in particular the Show and Read type class and the converters from the Numeric module), I drew a different picture.

Note, that the following PNG image became quite distorted when it was generated from the LaTeX source. But the proper version is available as a PDF or the PostScript file.


  1. I was just looking at a similar image from The Haskell School of Expression (http://www.haskell.org/soe/) but yours is much more exhaustive. I might actually print this and keep it nearby whilst programming. Thanks!

  2. Some time ago I made a similar (but less detailed) graph for myself.

    I sticked to OO-style class diagram. Concrete classes are outlined with gray frames, and polymorphic classes have rounded corners. Aggregation arrows indicate type parameters. Inheritance arrows indicate "is-a" relation. Only most important class methods or properties are shown. I originally published it in my Russian blog (no wonder nobody saw it).

    I find it quite useful too. Probably it might be a good complement to your graph.

    Here is its graphviz source (for those who want to modify it or generate other formats). Consider it being under simple permissive license.

  3. bucephalus, did you generate this graph using a tool that could be applied to document other classes? I was thinking of using it to document the numeric-prelude alternative package.
    Also the graph itself is one of the most helpful resources I have for understanding the number system. It is terrific work.