hawk icon indicating copy to clipboard operation
hawk copied to clipboard

auto-printf

Open gelisam opened this issue 12 years ago • 0 comments

Help the type-inferencer by parsing printf arguments and inserting the appropriate type signature, e.g.

> seq 3 | hawk 'printf "%0.02f\n"'
error: type "PrintfArg a1 => a1" is ambiguous

becomes

> seq 3 | hawk '(printf "%0.02f\n" :: Float -> String)'
1.00
2.00
3.00

gelisam avatar Aug 10 '13 16:08 gelisam