[Haskell-cafe] Getting started

Sean Perry shaleh at speakeasy.net
Fri Jul 2 00:27:26 EDT 2010


If you have not read it yet give http://learnyouahaskell.com a look.
Towards the end he walks through some of these kind of design issues
starting with types and functions working on the types.

Also, try putting the types and functions in a file and then loading the
file in ghci with "ghci foo.hs". Now you can play with the functions by
hand. This kind of experimentation is very valuable.

Finally, learn about unit testing. Haskell has very solid support for
test driven development and it is a good habit to get into. You start
thinking "hmm this function should take XX and return YY unless ZZ is
true" so you can write test cases to prove the function actually does
what you think. Forcing yourself to use your own API makes you think
more about how others might use it. It can also help lead you down the
design path as it becomes obvious that you need say a hash to store some
values.





More information about the Haskell-Cafe mailing list