[Haskell wikibook] Cheat sheet
duplode_1 at yahoo.com.br
Sat May 22 03:44:30 EDT 2010
I took a bit of a break from the book over this week in order to give
time to my ideas to get clearer. By the way, I just reduced my Haskell
naivety a bit by writing an useful-ish standalone "real world" program,
which works fine other than for being very memory hungry (still, the
code is *so* much nicer to work with than the corresponding procedural
implementations that I would gladly concede it a couple hundred
megabytes to play with). Anyway...
On 05/17/2010 11:41 AM, Heinrich Apfelmus wrote:
> An example is worth more than a hundred words. ;) I think they make
> excellent one-line explanations. In fact, I'm unsure whether it's a good
> idea to write more detailed explanations at all, I'd rather link to the
> official documentation for that.
I agree to your feelings about detailed explanations; writing them would
likely be a boring and potentially pointless task. Replacing the
wikilinks in the table with auto-generated links to the docs can
probably be done in a reasonably painless way with an extra template.
> Also, I'm unhappy with the current markup we have to use. It's much
> easier to specify it in "pseudo haddock markup"
> -- | Last element.
> --> last [1,2,3] = 3
> last :: [a] -> a
> -- | Number of elements.
> --> length [True, False] = 2
> length :: [a] -> Int
> and have a Haskell program translate that to wikitext or any other format.
That would be an interesting possibility for generating the tables...
too bad we can't shortcut around the MediaWiki interface, and would
likely still have to rely on it (and its hideous triple-curly-bracket
syntax) for maintenance of the cheat sheets after they are uploaded. By
the way, that reminds me I used to have a neat Firefox add-on which
allowed to edit the contents of any text area into vim; it could become
handy in such circumstances.
By the way, a note about the chapters: I am missing a bit of doing some
actual writing, so if I feel brave enough I will try to contribute to
some of the missing bits of Basics. The most likely targets for me would
be the initial explanation of numerical types in "Type basics" or some
of the list comprehension introduction that will become "Working with
More information about the Wikibook