Maintainability of Haskell Code

structured logging

Event Sourcing

Input Validation

Configuration Management

Infrastructure and DevOps Tooling

Website Application Architecture

Software Transactional Memory

Concurrent Programming

Recommended Reading

Isomorphic Haskell

Domain Driven Design

Existential Types

Full Websites

Webserver and API

Setting up haskell-vim-now on a Cloud9 workspace:

  1. Start with a Blank workspace.
  2. Increase resources (use at least 7GB for disk and 2GB for ram, but more is better).
  3. Edit styles.css to use a powerline font:
    @import url(;
  4. Update apt:
    sudo apt-get update
  5. Install the Haskell stack:
    curl -sSL | sh
  6. Install haskell-vim-now:
    curl -L > /tmp/
    bash /tmp/
  7. Enjoy!


Switch to a newer version of node with nvm:

nvm install 6.9.2
nvm alias default 6.9.2

Uninstall any older versions:

nvm ls
nvm uninstall 4.6.1

Execute nix-shell to bootstrap the environment

Create hello.hs

x :: Integer
x = 3
ghci -ignore-dot-ghci 

:load hello.hs #loads from filesystem
:r # reload loaded modules (inc hello.hs)
:t x # obtain type signature of x


cons ::

cons - head and tail

>> :t (:.)
(:.) :: t -> List t -> List t
>> 1 :. 2 :. 3 :. 4 :. Nil

The word “cons” and expressions like “to cons onto” are also part of a more general functional programming jargon. Sometimes operators that have a similar purpose, especially in the context of list processing, are pronounced “cons”. (A good example is the :: operator in ML, Scala, F# and Elm or the : operator in Haskell, which adds an element to the beginning of a list.)


generics :: type variables cons ::

cons - head and tail

>> :t (:.)
(:.) :: t -> List t -> List t

Pattern Matching

Can enable warnings when not all patterns are matched set fwarn-incomplete-patterns see




Point Free

sum' xs = foldr (+) 0 xs


Look at the signature and write down what you have (tm) and write down what you need to get to (tm)

data Optional a =
  Full a
  | Empty
  deriving (Eq, Show)
What I have                                                                                    
x :: a
f :: a -> Optional b
What do I need to get to?
? :: Optional b


Day 1

Determining file location of a type

>> :i Full
data Optional a = Full a | ...
        -- Defined at src/Course/Optional.hs:15:3




date time

hot paths