Commit 1df10fbd authored by Simon Peyton Jones's avatar Simon Peyton Jones

Fewer parens when printing HsPat

parent ec07e1fd
ds020.hs:5:1:
Warning: Pattern match(es) are overlapped
In the definition of `a': a ~(~[], ~[], ~[]) = ...
ds020.hs:8:1:
Warning: Pattern match(es) are overlapped
In the definition of `b': b ~(~x : ~xs : ~ys) = ...
ds020.hs:13:1:
Warning: Pattern match(es) are overlapped
In the definition of `d':
d ~(n+43) = ...
d ~(n+999) = ...
ds020.hs:19:1:
Warning: Pattern match(es) are overlapped
In the definition of `f': f (x@(~[])) = ...
ds020.hs:5:1:
Warning: Pattern match(es) are overlapped
In the definition of `a': a ~(~[], ~[], ~[]) = ...
ds020.hs:8:1:
Warning: Pattern match(es) are overlapped
In the definition of `b': b ~(~x : ~xs : ~ys) = ...
ds020.hs:13:1:
Warning: Pattern match(es) are overlapped
In the definition of `d':
d ~(n+43) = ...
d ~(n+999) = ...
ds020.hs:19:1:
Warning: Pattern match(es) are overlapped
In the definition of `f': f x@(~[]) = ...
gadt21.hs:21:60:
Could not deduce (Ord a1) from the context (a ~ Set a1)
arising from a use of `f' at gadt21.hs:21:60-62
Possible fix:
add (Ord a1) to the context of the constructor `TypeSet'
In the first argument of `Just', namely `(f e)'
In the expression: Just (f e)
In the definition of `withOrdDynExpr':
withOrdDynExpr (DynExpr (e@(Const (TypeSet _) _))) f = Just (f e)
gadt21.hs:21:60:
Could not deduce (Ord a1) from the context (a ~ Set a1)
arising from a use of `f' at gadt21.hs:21:60-62
Possible fix:
add (Ord a1) to the context of the constructor `TypeSet'
In the first argument of `Just', namely `(f e)'
In the expression: Just (f e)
In the definition of `withOrdDynExpr':
withOrdDynExpr (DynExpr e@(Const (TypeSet _) _)) f = Just (f e)
tcfail124.hs:6:8:
Couldn't match expected type `forall a. (Eq a) => [a]'
against inferred type `[a]'
In the pattern: x : _
In the definition of `f1': f1 (xs@(x : _)) = x
tcfail124.hs:9:4:
Couldn't match expected type `forall a. (Eq a) => [a]'
against inferred type `[a]'
In the pattern: [x]
In the definition of `f2': f2 [x] = x
tcfail124.hs:12:5:
Couldn't match expected type `forall a. (Eq a) => [a]'
against inferred type `[a]'
In the pattern: x : []
In the definition of `f3': f3 (x : []) = x
tcfail124.hs:6:8:
Couldn't match expected type `forall a. (Eq a) => [a]'
against inferred type `[a]'
In the pattern: x : _
In the definition of `f1': f1 xs@(x : _) = x
tcfail124.hs:9:4:
Couldn't match expected type `forall a. (Eq a) => [a]'
against inferred type `[a]'
In the pattern: [x]
In the definition of `f2': f2 [x] = x
tcfail124.hs:12:5:
Couldn't match expected type `forall a. (Eq a) => [a]'
against inferred type `[a]'
In the pattern: x : []
In the definition of `f3': f3 (x : []) = x
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