haskell Constraint manipulation