Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You know all you need to go forth and write code. But if you're looking for more Haskell-y things to learn about, may I suggest:</p> <ul> <li>Type families. Very handy feature. It basically gives you a way to write functions on the level of types, which is handy when you're trying to write a function whose parameters are polymorphic in a very precise way. One such example:</li> </ul> <p><code><pre> data TTrue = TTrue data FFalse = FFalse</p> <p>class TypeLevelIf tf a b where type If tf a b weirdIfStatement :: tf -> a -> b -> tf a b</p> <p>instance TypeLevelIf TTrue a b where type If TTrue a b = a weirdIfStatement TTrue a b = a</p> <p>instance TypeLevelIf FFalse a b where type If FFalse a b = b weirdIfStatement FFalse a b = a </pre></code></p> <p>This gives you a function that behaves like an <code>if</code> statement, but is able to return different types based on the truth value it is given.</p> <p>If you're curious about type-level programming, type families provide one avenue into this topic.</p> <ul> <li><p>Template Haskell. This is a huge subject. It gives you a power similar to macros in C, but with much more type safety.</p></li> <li><p>Learn about some of the leading Haskell libraries. I can't count how many times parsec has enabled me to write an insanely useful utility quickly. dons periodically publishes a list of popular libraries on hackage; <a href="http://donsbot.wordpress.com/2010/06/30/popular-haskell-packages-q2-2010-report/" rel="nofollow noreferrer">check it out</a>.</p></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload