blob: 86f983241b349c10ea4f5113bc1af4f27879ed75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
TyAppPat_PatternBindingExistential.hs:10:1: error:
• Binding type variables is not allowed in pattern bindings
• In the pattern: Some @a x
In a pattern binding: Some @a x = Some (5 :: Integer)
TyAppPat_PatternBindingExistential.hs:10:9: error:
• Couldn't match expected type ‘p’ with actual type ‘a’
‘a’ is a rigid type variable bound by
a pattern with constructor: Some :: forall a. a -> Some,
in a pattern binding
at TyAppPat_PatternBindingExistential.hs:10:1-9
‘p’ is a rigid type variable bound by
the inferred type of x :: p
at TyAppPat_PatternBindingExistential.hs:10:1-31
• In the pattern: Some @a x
In a pattern binding: Some @a x = Some (5 :: Integer)
TyAppPat_PatternBindingExistential.hs:13:3: error:
• Ambiguous type variable ‘a0’ arising from a use of ‘print’
prevents the constraint ‘(Show a0)’ from being solved.
Probable fix: use a type annotation to specify what ‘a0’ should be.
These potential instances exist:
instance Show Ordering -- Defined in ‘GHC.Show’
instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’
instance Show Integer -- Defined in ‘GHC.Show’
...plus 22 others
...plus 12 instances involving out-of-scope types
(use -fprint-potential-instances to see them all)
• In a stmt of a 'do' block: print (x :: a)
In the expression: do print (x :: a)
In an equation for ‘main’: main = do print (x :: a)
|