h,$_      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~0.3.0.0 Safe-Inferred )*01Parse a numberParse a single digit4This is very slow because it goes down both branches" Safe-Inferred 1 Safe-Inferred %&01[!    (c) Justin Le 2019BSD3 justin@jle.im experimental non-portableNone)*/01>!Utility type powering .. See documentation for . for more information on usage.Using OverloadedLabels<, you never need to construct this directly can just write #f and a ! "f"5 will be generated. You can also create this using - or ,, in the situations where OverloadedLabels doesn't work or is not wanted.$ A version of 7 taking an explicit proxy, which allows usage without TypeApplicationsputStrLn $ printf_ (Proxy :: Proxy "You have %.2f dollars, %s") 3.62 "Luigi"You have 3.62 dollars, Luigi%A useful tool for helping the type system give useful errors for :1printf "You have ".2f" dollars, %s" 3.26 :: PHelp9-- ERROR: Call to printf missing argument fulfilling "%s"-- Either provide an argument or rewrite the format string to not expect-- one.Mostly useful if you want to force a useful type error to help see what is going on. See also ''A useful helper function for helping the type system give useful errors for printf:/pHelp $ printf "You have %.2f dollars, %s" 3.629-- ERROR: Call to printf missing argument fulfilling "%s"-- Either provide an argument or rewrite the format string to not expect-- one.Mostly useful if you want to force a useful type error to help see what is going on.(,The typeclass supporting polyarity used by &. It works in mostly the same way as   from  Text.Printf, and similar the same as   . Ideally, you will never have to run into this typeclass or have to deal with it directly.$Every item in the first argument of ( is a chunk of the formatting string, split between format holes () and string chunks (). that allows this, if you are using an earlier GHC version, you can get around this using -:pfmt (mkPFmt @".2f") 3.6234124"3.62"%Ideally we'd want to be able to writepfmt #.2f 3.6234124"3.62"'(which should be possible in GHC 8.10+);Note that the format string should not include the leading %.0 Treats as s1 Treats as s2 Treats as s3 Treats as g4 Treats as g5 Treats as u6 Treats as u7 Treats as u8 Treats as u9 Treats as u: Treats as u; Treats as d< Treats as d= Treats as d> Treats as d? Treats as d@ Treats as dA Treats as c //-,.()*+!"%&'#$    0     *+/#$()!".-,%&'(c) Justin Le 2019BSD3 justin@jle.im experimental non-portableNone)*/016=!"Type-safe printf". Call it like  "you have %.02f dollars, %s".:putStrLn $ printf "You have %.2f dollars, %s" 3.62 "Luigi"You have 3.62 dollars, LuigiNOTE: This is only type-safe in GHC 9.10 and above. A compatible version is provided in earlier versions that compiles (as long as you provide a string literal). For a type-safe version before GHC 9.10, use .Anyway, looking at its type:%:t printf "You have %.2f dollars, %s"*(FormatType "f" arg1, FormatType "s" arg2) => arg1 -> arg2 -> String#It tells you that the result is an arg1 -> arg2 -> $: take two arguments, and return a .. The first argument must be an instance of * "f"" (things that can be formatted by %f2) and the second argument must be an instance of * "s"" (things that can be formatted by %s).>We can see this in action by progressively applying arguments:*:t printf "You have %.2f dollars, %s" 3.62%FormatType "s" arg1 => arg1 -> String2:t printf "You have %.2f dollars, %s" 3.62 "Luigi"StringThe type errors for forgetting to apply an argument (or applying too many arguments) are pretty clear:-putStrLn $ printf "You have %.2f dollars, %s";-- ERROR: Call to printf missing argument fulfilling "%.2f"-- Either provide an argument or rewrite the format string to not expect-- one.2putStrLn $ printf "You have %.2f dollars, %s" 3.629-- ERROR: Call to printf missing argument fulfilling "%s"-- Either provide an argument or rewrite the format string to not expect-- one.:putStrLn $ printf "You have %.2f dollars, %s" 3.62 "Luigi"You have 3.62 dollars, Luigi=putStrLn $ printf "You have %.2f dollars, %s" 3.62 "Luigi" 72-- ERROR: An extra argument of type Integer was given to a call to printf-- Either remove the argument, or rewrite the format string to include the-- appropriate hole.?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~typelits-printf-0.3.0.0-inplaceGHC.TypeLits.Printf.InternalGHC.TypeLits.Printftypelits-printf#GHC.TypeLits.Printf.Internal.Parser*GHC.TypeLits.Printf.Internal.UnsatisfiableGHC.TypeLits.Printf.ParseprintfP PrintfTypeData.Symbol.Examples.PrintfFormatF $dmformatArg Data.TextTextData.Text.Lazybase Text.Printf FormatSignSignPlus SignSpaceFormatAdjustment LeftAdjustZeroPad ParseFmt_ParseFmt ParseFmtStr_ ParseFmtStr EmptyFlags ShowFormatReflectreflectDemote FieldFormatFFfmtChar fmtWidthMod fmtPrecisionfmtWidthfmtFlagsWidthModWMhhWMhWMlWMllWMLFlags fAlternatefSignfAdjustPFmtPrintfprintf_PHelppHelp FormatFun formatFun FormatType formatArgmkPFmt_mkPFmtpfmt$fFormatType'v'Text$fFormatType'v'Text0$fFormatType'v'List$fFormatType'v'Float$fFormatType'v'Double$fFormatType'v'Word64$fFormatType'v'Word32$fFormatType'v'Word16$fFormatType'v'Word8$fFormatType'v'Word$fFormatType'v'Natural$fFormatType'v'Integer$fFormatType'v'Int64$fFormatType'v'Int32$fFormatType'v'Int16$fFormatType'v'Int8$fFormatType'v'Int$fFormatType'v'Char$fFormatType's'Text$fFormatType's'Text0$fFormatType's'List$fFormatType'E'Float$fFormatType'E'Double$fFormatType'e'Float$fFormatType'e'Double$fFormatType'G'Float$fFormatType'G'Double$fFormatType'g'Float$fFormatType'g'Double$fFormatType'F'Float$fFormatType'F'Double$fFormatType'f'Float$fFormatType'f'Double$fFormatType'u'Word64$fFormatType'u'Word32$fFormatType'u'Word16$fFormatType'u'Word8$fFormatType'u'Word$fFormatType'u'Natural$fFormatType'u'Integer$fFormatType'u'Int64$fFormatType'u'Int32$fFormatType'u'Int16$fFormatType'u'Int8$fFormatType'u'Int$fFormatType'u'Char$fFormatType'b'Word64$fFormatType'b'Word32$fFormatType'b'Word16$fFormatType'b'Word8$fFormatType'b'Word$fFormatType'b'Natural$fFormatType'b'Integer$fFormatType'b'Int64$fFormatType'b'Int32$fFormatType'b'Int16$fFormatType'b'Int8$fFormatType'b'Int$fFormatType'b'Char$fFormatType'X'Word64$fFormatType'X'Word32$fFormatType'X'Word16$fFormatType'X'Word8$fFormatType'X'Word$fFormatType'X'Natural$fFormatType'X'Integer$fFormatType'X'Int64$fFormatType'X'Int32$fFormatType'X'Int16$fFormatType'X'Int8$fFormatType'X'Int$fFormatType'X'Char$fFormatType'x'Word64$fFormatType'x'Word32$fFormatType'x'Word16$fFormatType'x'Word8$fFormatType'x'Word$fFormatType'x'Natural$fFormatType'x'Integer$fFormatType'x'Int64$fFormatType'x'Int32$fFormatType'x'Int16$fFormatType'x'Int8$fFormatType'x'Int$fFormatType'o'Word64$fFormatType'o'Word32$fFormatType'o'Word16$fFormatType'o'Word8$fFormatType'o'Word$fFormatType'o'Natural$fFormatType'o'Integer$fFormatType'o'Int64$fFormatType'o'Int32$fFormatType'o'Int16$fFormatType'o'Int8$fFormatType'o'Int$fFormatType'o'Char$fFormatType'd'Word64$fFormatType'd'Word32$fFormatType'd'Word16$fFormatType'd'Word8$fFormatType'd'Word$fFormatType'd'Natural$fFormatType'd'Integer$fFormatType'd'Int64$fFormatType'd'Int32$fFormatType'd'Int16$fFormatType'd'Int8$fFormatType'd'Int$fFormatType'd'Char$fFormatType'c'Word16$fFormatType'c'Word8$fFormatType'c'Char$fFormatFun:fun$fFormatFun[]FUN$fFormatFun[]IO$fFormatFun[]Text$fFormatFun[]Text0$fFormatFun[]a$fFormatFun[]PHelp $fFormatFun'is_functionffffsafun$fFormatFun:afun$fFormatFun'Falseffffsnotafun$fPrintfstrfun$fIsLabelstrPFmtprintf'NumberDigit<|>*><$<$><*>AlphaAnyCharApHelpAsCharCatCatCharsCatHelp CharDigit ChoiceMaybe DigitHelpEvalHelp EvalHelp_ EvalParser EvalParser_ FromDigitsIsAlphaMany MapConHelpNotChar NumberHelpOptionalParserPureRepHelp RunParserSeqHelpSome unsatisfiable Unsatisfiable ghc-internalGHC.Internal.Data.EitherRightLeftGHC.Internal.BaseString