Misc haskell stuff