misc haskell functions/libraries