blob: e923a02472c162222bf4171e791d2494cc26ed02 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
T7857.hs:8:11: error:
Could not deduce (PrintfType r0) 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 ‘r0’ is ambiguous
These potential instances exist:
instance [safe] (a ~ ()) => PrintfType (IO a)
-- Defined in ‘Text.Printf’
instance [safe] (PrintfArg a, PrintfType r) => PrintfType (a -> r)
-- Defined in ‘Text.Printf’
instance [safe] IsChar c => PrintfType [c]
-- Defined in ‘Text.Printf’
In the second argument of ‘($)’, namely ‘printf "" i’
In the expression: f $ printf "" i
In an equation for ‘g’: g i = f $ printf "" i
|