summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/TyAppPat_PatternBindingExistential.stderr
blob: a77ad07422a9ec588e32170e79642960d4f848e4 (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

TyAppPat_PatternBindingExistential.hs:10:1: error: [GHC-48361]
    • 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: [GHC-25897]
    • 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: [GHC-39999]
    • 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.
      Potentially matching instances:
        instance Show Ordering -- Defined in ‘GHC.Show’
        instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’
        ...plus 25 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)