Skip to content

Commit

Permalink
Update output: More elaborate GND error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
nomeata committed Dec 4, 2013
1 parent b3b88db commit 20d7273
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
4 changes: 3 additions & 1 deletion tests/deriving/should_fail/T1496.stderr
Expand Up @@ -2,7 +2,9 @@
T1496.hs:10:32:
Could not coerce from ‛c Int’ to ‛c Moo’
because ‛c Int’ and ‛c Moo’ are different types.
arising from the 'deriving' clause of a data type declaration
arising from the coercion of the method ‛isInt’ from type
‛forall (c :: * -> *). c Int -> c Int’ to type
‛forall (c :: * -> *). c Int -> c Moo’
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
Expand Down
8 changes: 6 additions & 2 deletions tests/deriving/should_fail/T7148.stderr
Expand Up @@ -3,7 +3,9 @@ T7148.hs:27:40:
Could not coerce from ‛SameType b1 b’ to ‛SameType b1 (Tagged a b)’
because the second type argument of ‛SameType’ has role Nominal,
but the arguments ‛b’ and ‛Tagged a b’ differ
arising from the 'deriving' clause of a data type declaration
arising from the coercion of the method ‛iso2’ from type
‛forall b. SameType b () -> SameType b b’ to type
‛forall b. SameType b () -> SameType b (Tagged a b)’
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
Expand All @@ -13,7 +15,9 @@ T7148.hs:27:40:
Could not coerce from ‛SameType b b1’ to ‛SameType (Tagged a b) b1’
because the first type argument of ‛SameType’ has role Nominal,
but the arguments ‛b’ and ‛Tagged a b’ differ
arising from the 'deriving' clause of a data type declaration
arising from the coercion of the method ‛iso1’ from type
‛forall b. SameType () b -> SameType b b’ to type
‛forall b. SameType () b -> SameType (Tagged a b) b’
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
Expand Down
4 changes: 3 additions & 1 deletion tests/deriving/should_fail/T7148a.stderr
Expand Up @@ -2,7 +2,9 @@
T7148a.hs:19:50:
Could not coerce from ‛Result a b’ to ‛b’
because ‛Result a b’ and ‛b’ are different types.
arising from the 'deriving' clause of a data type declaration
arising from the coercion of the method ‛coerce’ from type
‛forall b. Proxy b -> a -> Result a b’ to type
‛forall b. Proxy b -> IS_NO_LONGER a -> Result (IS_NO_LONGER a) b’
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
Expand Down
3 changes: 2 additions & 1 deletion tests/gadt/CasePrune.stderr
Expand Up @@ -3,7 +3,8 @@ CasePrune.hs:14:31:
Could not coerce from ‛T Int’ to ‛T A’
because the first type argument of ‛T’ has role Nominal,
but the arguments ‛Int’ and ‛A’ differ
arising from the 'deriving' clause of a data type declaration
arising from the coercion of the method ‛ic’ from type ‛T Int’
to type ‛T A’
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
Expand Down
3 changes: 2 additions & 1 deletion tests/roles/should_fail/Roles10.stderr
Expand Up @@ -2,7 +2,8 @@
Roles10.hs:16:12:
Could not coerce from ‛Bool’ to ‛Char’
because ‛Bool’ and ‛Char’ are different types.
arising from the 'deriving' clause of a data type declaration
arising from the coercion of the method ‛meth’ from type
‛Int -> F Int’ to type ‛Age -> F Age’
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
Expand Down

0 comments on commit 20d7273

Please sign in to comment.