Commit faf67664 authored by simonpj@microsoft.com's avatar simonpj@microsoft.com
Browse files

When complaining about non-rigid context, give suggestion of adding a signature

parent 219f900f
...@@ -1107,11 +1107,11 @@ lazyPatErr pat tvs ...@@ -1107,11 +1107,11 @@ lazyPatErr pat tvs
nonRigidMatch con nonRigidMatch con
= hang (ptext SLIT("GADT pattern match in non-rigid context for") <+> quotes (ppr con)) = hang (ptext SLIT("GADT pattern match in non-rigid context for") <+> quotes (ppr con))
2 (ptext SLIT("Tell GHC HQ if you'd like this to unify the context")) 2 (ptext SLIT("Solution: add a type signature"))
nonRigidResult res_ty nonRigidResult res_ty
= hang (ptext SLIT("GADT pattern match with non-rigid result type") <+> quotes (ppr res_ty)) = hang (ptext SLIT("GADT pattern match with non-rigid result type") <+> quotes (ppr res_ty))
2 (ptext SLIT("Tell GHC HQ if you'd like this to unify the context")) 2 (ptext SLIT("Solution: add a type signature"))
inaccessibleAlt msg inaccessibleAlt msg
= hang (ptext SLIT("Inaccessible case alternative:")) 2 msg = hang (ptext SLIT("Inaccessible case alternative:")) 2 msg
......
Supports Markdown
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