diff options
| author | simonpj@microsoft.com <unknown> | 2009-01-13 16:40:20 +0000 |
|---|---|---|
| committer | simonpj@microsoft.com <unknown> | 2009-01-13 16:40:20 +0000 |
| commit | cab7dec5854951416c56e64cda66a4bd96aeaa0f (patch) | |
| tree | 0cef8c135188d4687de9ad0e9b52eb8afe503acd | |
| parent | 120c4c72d6b12e765da9e69612351a53fb7cef4b (diff) | |
| download | haskell-cab7dec5854951416c56e64cda66a4bd96aeaa0f.tar.gz | |
Improve error messages slightly
| -rw-r--r-- | compiler/typecheck/TcPat.lhs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/typecheck/TcPat.lhs b/compiler/typecheck/TcPat.lhs index b8bbed710c..c6caa54517 100644 --- a/compiler/typecheck/TcPat.lhs +++ b/compiler/typecheck/TcPat.lhs @@ -978,7 +978,7 @@ patCtxt pat = Just (hang (ptext (sLit "In the pattern:")) existentialExplode :: LPat Name -> SDoc existentialExplode pat = hang (vcat [text "My brain just exploded.", - text "I can't handle pattern bindings for existentially-quantified constructors.", + text "I can't handle pattern bindings for existential or GADT data constructors.", text "Instead, use a case-expression, or do-notation, to unpack the constructor.", text "In the binding group for"]) 4 (ppr pat) @@ -1030,7 +1030,7 @@ existentialProcPat con lazyPatErr :: Pat name -> [TcTyVar] -> TcM () lazyPatErr _ tvs = failWithTc $ - hang (ptext (sLit "A lazy (~) pattern cannot bind existential type variables")) + hang (ptext (sLit "A lazy (~) pattern cannot match existential or GADT data constructors")) 2 (vcat (map pprSkolTvBinding tvs)) nonRigidMatch :: PatCtxt -> DataCon -> SDoc |
