Haskell implementation of lambda calculus