× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

Tips for learning Haskell

Mouna Cheikhna
Nov 20, 2016
<ul> <li>Use ghci more to ask for the types.</li> <li>Trust the types. Always pay attention to type signatures. If they're generic, check the instances and the class type with Hoogle. </li> <li>Familiarize yourself with as many API functions in as many of the modules of the Haskell platform (especially the base package) as much as you can.</li> <li> Von Neumann's "You don't understand mathematics, you just get used to it" is a pretty sane approach to Haskell so follow it and just keep learning untill you get used to haskelll's way of thinking.</li> <li>Let go of the safety handles, start trying to use and trust the abstractions haskell provides and after a little while of fumbling about trying to understand Monads you will find you developed some intuition for them. </li> <li>When it gets hard just be sure that you are not stupid or going crazy. What you are experiencing is learning a whole new way of looking at programming which will take time and effort, and that it does get better. Much better over time.</li> <li>Learn how to vocalise everything. For example, for instance Monoid v =&gt; Monoid (Map k v) where ... I vocalise it as 'Given v is an instance of Monoid, then Map of k and v is an instance of Monoid where ...'. For fmap :: (a -&gt; b) -&gt; f a -&gt; f b, I'd say 'fmap has type, a to b, to f of a, to f of b'. And so on.</li> </ul> <p>Good luck!<br>  </p>
comments powered by Disqus