Haskell stuff from final year.