summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T7857.stderr
blob: 699017d79bdf9fa86c0195136abd109a339dbcbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

T7857.hs:8:11: error: [GHC-39999]
    • Could not deduce ‘PrintfType a0’ arising from a use of ‘printf’
      from the context: PrintfArg t
        bound by the inferred type of g :: PrintfArg t => t -> b
        at T7857.hs:8:1-21
      The type variable ‘a0’ is ambiguous
      Potentially matching instances:
        instance [safe] (a ~ ()) => PrintfType (IO a)
          -- Defined in ‘Text.Printf’
        instance [safe] (PrintfArg a, PrintfType r) => PrintfType (a -> r)
          -- Defined in ‘Text.Printf’
        ...plus one other
        (use -fprint-potential-instances to see them all)
    • In the second argument of ‘($)’, namely ‘printf "" i’
      In the expression: f $ printf "" i
      In an equation for ‘g’: g i = f $ printf "" i