Skip to content

Instantly share code, notes, and snippets.

How to install latest GHC 7.10.1 + cabal 1.22.3.0 from source on Debian Testing

ghc 7.10.1 installation

Debian prerequisites

    $ sudo apt-get install build-essential ca-certificates xz-utils -y
    $ sudo apt-get install libgmp10 libgmp-dev libffi-dev zlib1g-dev -y  
    $ sudo -K

The Indexed State Monad in Haskell, Scala, and C#

Have you ever had to write code that made a complex series of succesive modifications to a single piece of mutable state? (Almost certainly yes.)

Did you ever wish you could make the compiler tell you if a particular operation on the state was illegal at a given point in the modifications? (If you're a fan of static typing, probably yes.)

If that's the case, the indexed state monad can help!

Motivation

  1. General Background and Overview