Solver for Haskell-like type constraints with nice error messages