natural logic in Haskell