blob: 2596efb51f7bcd193da9ed0f34f8396f3648b174 (
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 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
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
|