Commit 0b42a7dc authored by dimitris's avatar dimitris
Browse files

Preserve synonyms if possible (leads to better error messages) through flattening.

parent 418d0912
......@@ -506,7 +506,8 @@ flatten :: SubGoalDepth -- Depth
flatten d f ctxt ty
| Just ty' <- tcView ty
= do { (xi, co) <- flatten d f ctxt ty'
; return (xi,co) }
; if eqType xi ty then return (ty,co) else return (xi,co) }
-- Small tweak for better error messages
flatten _ _ _ xi@(LitTy {}) = return (xi, mkTcReflCo xi)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment