#~r      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Safe &'-.HUVtypelits-printfParse a numbertypelits-printfParse a single digittypelits-printfKA type synonym for a single-character symbol. Ideally this would just be >, but we don't have chars at the type level. So, if you see h in a type signature, it means that it's expected to be a symbol/string with only one single character.#Safe"#-.=?HUVX_k6"  !(c) Justin Le 2019BSD3 justin@jle.im experimental non-portableNone&',-.8=?@ACHSUVX_gkN"typelits-printfUtility 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.%typelits-printf A version of 7 taking an explicit proxy, which allows usage without TypeApplicationsLputStrLn $ printf_ (Proxy :: Proxy "You have %.2f dollars, %s") 3.62 "Luigi"You have 3.62 dollars, Luigi&typelits-printfBA useful tool for helping the type system give useful errors for :2printf @"You have ".2f" dollars, %s" 3.26 :: PHelp9-- ERROR: Call to printf missing argument fulfilling "%s"H-- Either provide an argument or rewrite the format string to not expect-- one.UMostly useful if you want to force a useful type error to help see what is going on. See also ((typelits-printfMA useful helper function for helping the type system give useful errors for printf:0pHelp $ printf @"You have %.2f dollars, %s" 3.629-- ERROR: Call to printf missing argument fulfilling "%s"H-- Either provide an argument or rewrite the format string to not expect-- one.UMostly useful if you want to force a useful type error to help see what is going on.)typelits-printf,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 )C is a chunk of the formatting string, split between format holes () and string chunks ().<If you want to see some useful error messages for feedback, ( can be useful:0pHelp $ printf @"You have %.2f dollars, %s" 3.629-- ERROR: Call to printf missing argument fulfilling "%s"H-- Either provide an argument or rewrite the format string to not expect-- one.+typelits-printf$Typeclass associating format types (d, f6, etc.) with the types that can be formatted by them.ZYou can extend the printf methods here for your own types by writing your instances here.-typelits-printf A version of .$ that takes an explicit proxy input./pfmt (mkPFmt_ (Proxy :: Proxy ".2f")) 3.6234124"3.62".typelits-printfUseful for using / without OverloadedLabelsN, or also when passing format specifiers that aren't currently allowed with OverloadedLabels until GHC 8.10+ (like #.2f).pfmt (mkPFmt @".2f") 3.6234124"3.62"/typelits-printfParse and run a single| format hole on a single vale. Can be useful for formatting individual items or for testing your own custom instances of +.Usually meant to be used with OverloadedLabels: pfmt #f 3.62"3.62"nHowever, current versions of GHC disallow labels that aren't valid identifier names, disallowing things like / #.2f 3.62. While there is an < khttps://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0170-unrestricted-overloadedlabels.rsto approved proposal> 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 %.0typelits-printf Treats as s1typelits-printf Treats as s2typelits-printf Treats as s3typelits-printf Treats as g4typelits-printf Treats as g5typelits-printf Treats as u6typelits-printf Treats as u7typelits-printf Treats as u8typelits-printf Treats as u9typelits-printf Treats as u:typelits-printf Treats as u;typelits-printf Treats as d<typelits-printf Treats as d=typelits-printf Treats as d>typelits-printf Treats as d?typelits-printf Treats as d@typelits-printf Treats as dAtypelits-printf Treats as c0  !"#$%&'()*+,-./0   !  +,$%)*"#/.-&'((c) Justin Le 2019BSD3 justin@jle.im experimental non-portableNone&',-.8=?@ACHSUVX_gkrEtypelits-printf!"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, LuigiLooking 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 -> String3:t printf @"You have %.2f dollars, %s" 3.62 "Luigi"StringgThe 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"H-- Either provide an argument or rewrite the format string to not expect-- one.3putStrLn $ printf @"You have %.2f dollars, %s" 3.629-- ERROR: Call to printf missing argument fulfilling "%s"H-- 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" 72I-- ERROR: An extra argument of type Integer was given to a call to printfJ-- Either remove the argument, or rewrite the format string to include the-- appropriate hole.<If you want to see some useful error messages for feedback, ( can be useful:0pHelp $ printf @"You have %.2f dollars, %s" 3.629-- ERROR: Call to printf missing argument fulfilling "%s"H-- Either provide an argument or rewrite the format string to not expect-- one.fNote that this also supports the "interpret as an IO action to print out results" functionality that  Text.Printf1 supports. This also supports returning strict   and lazy    as well. "%&()+,-./ %&()+,/".-       !"#$%&'()**+,-../01123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~    typelits-printf-0.2.0.0-inplaceGHC.TypeLits.Printf.InternalGHC.TypeLits.Printf#GHC.TypeLits.Printf.Internal.ParserGHC.TypeLits.Printf.ParseprintfData.Symbol.Examples.PrintfFormatF Data.TextTextData.Text.Lazybase Text.PrintfZeroPad LeftAdjustFormatAdjustment SignSpaceSignPlus FormatSignSChar ParseFmt_ParseFmt ParseFmtStr_ ParseFmtStr EmptyFlags ShowFormatReflectreflectDemote FieldFormatFFfmtFlagsfmtWidth fmtPrecision fmtWidthModfmtCharWidthModWMhhWMhWMlWMllWMLFlagsfAdjustfSign fAlternatePFmtPrintfprintf_PHelppHelp FormatFun formatFun FormatType formatArgmkPFmt_mkPFmtpfmt$fFormatType"v"Text$fFormatType"v"Text0$fFormatType"v"[]$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"[]$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:afun$fFormatFun:fun$fFormatFun[]->$fFormatFun[]()$fFormatFun[]IO$fFormatFun[]Text$fFormatFun[]Text0$fFormatFun[]a$fFormatFun[]PHelp$fFormatFun:IO$fFormatFun:PHelp$fFormatFun:Text$fFormatFun:Text0$fFormatFun:()$fFormatFun:[]$fPrintfstrfun$fIsLabelstrPFmtNumberDigitghc-prim GHC.TypesCharIsAlphaCatChars FromDigits CharDigit EvalParser_ EvalHelp_ EvalParserEvalHelpCatHelpCat NumberHelpSomeManyApHelp<*> MapConHelp<$> DigitHelpSeqHelp*>Optional ChoiceMaybe<|>RepHelp<$AlphaAnySymNotSymSymPure RunParserParser PrintfType Data.EitherRightLeftGHC.BaseString