[Haskell wikibook] Splitting of "More on Datatypes"
duplode_1 at yahoo.com.br
Sun May 9 15:05:32 EDT 2010
One of the ideas I had while reading the book but didn't have the guts
to pull off without asking for feedback was splitting the More on
Datatypes module in Intermediate Haskell. As of now, it has a first part
which describes an assortment of important datatype techniques
(enumerations, records and a more formal presentation of parametrized
types - using Maybe as example) and then moves on to a long discussion
of binary trees and how to define maps and folds for arbitrary data
structures. The coupling of these two parts is very loose (the only
concept of the first part needed for the data structure discussions is
parametrization) and probably does not justify them being glued together
to make such a long (27k) module. Another related issue is that one
important omission from the Beginner's Track is an explanation of
newtype, and I guess More on Datatypes would be the right place to put
it. That would make the module even longer, however, and would be
another reason to make the split.
The only thing I am not sure of is a good name for the second "half" of
More on Datatypes in case of a split. The obvious choice would be "Trees
and ???" (I have no idea of a good concise term to replace the ???),
although maybe something more generic like "Introduction to Data
Structures" could work.
Thanks, and see you,
P.S.: By the way, Apfelmus has moved Type Declarations to just before
Pattern Matching. Probably the right thing to do (it just didn't fit
very well in Haskell Basics), but it will also require some reworking of
Type Declarations (when I made that module more verbose I envisioned it
as a preparation for a more general Pattern Matching discussion several
modules ahead, but with the rearranging the redundancies are probably
too obvious). I will give it a try soon.
More information about the Wikibook