4 ms·
Yeah, sorry. Here's the full snippet: instance (PrintfArg a, PrintfType r) => PrintfType (a -> r) where spr fmts args = \ a -> spr fmts (toUPrintf a :
by chongli 14y ago
Yeah, sorry. Here's the full snippet:
instance (PrintfArg a, PrintfType r) => PrintfType (a -> r) where
spr fmts args = \ a -> spr fmts (toUPrintf a : args)
And spr is a polymorphic function of the type:
spr :: String -> [UPrintf] -> t
Essentially the way this works is that it recursively conses up a list of the arguments, calling toUPrintf on each.