inference from haskell writing