Îõ³h$óuÁ      !"#$%&'()*+,-./0123456789:;<=>?@(c) 2016-2018 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela  Safe-Inferrede percent-formatonly for Number types percent-format+only for Number types, Nothing for infinitepercent-formatminimum precision to showpercent-format"whether to capitalize (hex) digits    (c) 2016-2018 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela  Safe-InferredLpercent-format-Reads a value encoded as a string, return A the value or B on error.percent-formatrightAlign c w s aligns C s% to the right in a field of width w using D c as padding. right ' ' 5 "123"" 123"percent-format left c w s aligns C s$ to the left in a field of width w using D c as padding. left ' ' 5 "123""123 "percent-formatshowWithBase b n$ returns a string representation of n in base b. showWithBase 2 10Ë"1010" > showWithBase 16 49406 "c0f3" > showWithBase 10 (-1234) "-1234"percent-format?Given an integer, returns a list of digits. Signal is ignored. percent-formatÃLike cycle, but return an empty list when the source list is empty.  !  !(c) 2018 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela  Safe-Inferred ” "percent-format/Our own Ratio type that allows Infinity and NaN#percent-formatSmart-constructor for Quotients$percent-format Infinity.%percent-format Not a number (0 / 0).&percent-format6Returns whether a given quotient is an infinity (+/-).'percent-format(Returns if the quotient is not a number.*percent-format´Given a quotient (rational number), returns a tuple with its integer part, its fractional digits and the period size (last fractional digits). The signal is ignored. Ÿ> digits 10 (1234567 / 100) Right ([1,2,3,4,5],[6,7],[]) > digits 10 (1/3) Right ([0],[3],1) > digits 10 (1/6) Right ([0],[1,6],1) > digits 10 (1/7) Right ([0],[1,4,2,8,5,7],6) > digits 10 (1/11) Right ([0],[0,9],2) digits 10 (1/12) Right ([0],[0,8,3],1) > digits 10 (1/13) Right ([0],[0,7,6,9,2,3],6) > digits 10 123 Right ([1,2,3],[],[]) > digits 10 (-4/3) Right ([1],[],[3]) > digits 10 (-1/3) Right ([0],[],[3])+percent-formatÞGivent a base, returns the fractional digits of a Quotient (including a period if present). ä> fracDigits 10 (123 / 100) ([2,3],[]) > fracDigits 10 (12345 / 100) ([4,5],[]) > fracDigits 10 (12345 / 10) ([5],[]) > fracDigits 10 (100 / 10) ([],[]) > fracDigits 10 (1 / 3) ([],[3]) > fracDigits 10 (1 / 7) ([],[1,4,2,8,5,7])1percent-formatE instance for "ê. Follows the regular order properties except for NaN. When NaN is present in any of the operands of F, G is returned (consistent with H & I).2percent-formatJ instance for "ë. Follows the identity property except for NaN which is different from itself (this is consistent with H & I behaviour). "#$%&'()*+ "#$%&')(*+K7#7(c) 2016-2018 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela  Safe-InferredI3percent-formatùFormats a single value into a string without finalizing: leaving duplicate percent signs & remaining format sequences. &> "Hello %s!" % "World" "Hello World!" 6> "processor usage: %d%%" % 67 "processor usage: 67%%" À> "load avg: %.2f %.2f %.2f" % 0.666 "load avg: %0.67 %.2f %.2f" Please use 4Û when formatting the last value into a string so that duplicate percent signs are removed.4percent-formatªFormats the last value into a string. This finalizes formatting, removing duplicate percent signs and replacing remaining format sequences with interrogation marks. '> "Hello %s!" -% "World" "Hello World!" 6> "processor usage: %d%%" -% 67 "processor usage: 67%" :> "load avg: %.2f %.2f %.2f" % 0.666 "load avg: %0.67 ? ?" Please use 33 if you intend to further format values (chaining).5percent-formatœReplaces "%%" by "%". Any remaining occurrences of format strings are replaced by the given error character. Field width is respected when possible. > "100%% %i" /% '?' "100% ?"  > "100%% %03i" /% '?' "100% ???"6percent-formatõFormats two values into a string without finalizing: leaving duplicate percent signs & remaining format sequences. .> "%s %s!" %% ("Hello","World") "Hello World!" Ê> "load avg: %.2f %.2f %.2f" %% (0.666,0.333) "load avg: %0.67 %0.33 %.2f" In general: s %% (x,y) == s % x % y Please use ;À if you don't intend to format values into a string any further.7percent-format6Formats three values into a string without finalizing. Ð> "load avg: %.2f %.2f %.2f" %%% (0.666,0.333,0.1) "load avg: %0.67 %0.33 %0.10"8percent-format5Formats four values into a string without finalizing.9percent-format5Formats five values into a string without finalizing.:percent-format4Formats six values into a string without finalizing.;percent-formatšFormats two values into a string and finalizes it: removing duplicate percent signs & replacing remaining format sequences with interrogation marks. /> "%s %s!" -%% ("Hello","World") "Hello World!" È> "load avg: %.2f %.2f %.2f" -%% (0.666,0.333) "load avg: %0.67 %0.33 ?" In general: s -%% (x,y) == s % x -% y Please use 6( if you intend to further format values.<percent-format4Formats three values into a string and finalizes it. Ñ> "load avg: %.2f %.2f %.2f" -%%% (0.666,0.333,0.1) "load avg: %0.67 %0.33 %0.10"=percent-format3Formats four values into a string and finalizes it.>percent-format3Formats five values into a string and finalizes it.?percent-format2Formats six values into a stirng and finalizes it.@percent-formatJust an alias to 3 for use whenever  Data.Ratio is in scope. Èimport Data.Ratio import Text.PercentFormat hiding ((%)) "..." +% 1 -% 23456789:;<=>?@3456789:;<=>?@39 49 Ì       !"#$%&'()*+,-./012345&6789:;<=>?@ABCDCEFGHIJHKLHKMHINHIOHIPHKQRÓ+percent-format-0.0.2-D2xINMa7VWc7CajcS2r5ckText.PercentFormat.SpecText.PercentFormat.UtilsText.PercentFormat.QuotientText.PercentFormatSpecType NumberSpecReprSpec StringSpecCharSpecPercentSpectywidth leftAlignpadWithbase precision minPrecisionpositivePrefixcapitalizeDigitsspec parseSpec$fEqSpec $fShowSpec $fEqSpecType$fShowSpecType maybeReadalign rightAlign showWithBaseintegerToDigits applyWhen intsToDigitstheLastloopnoneQuotient%infinitynan isInfiniteisNaN maybeReadQreadQdigits fracDigits$fRealFracQuotient$fRealQuotient$fFractionalQuotient $fNumQuotient$fShowQuotient $fOrdQuotient $fEqQuotient-%/%%%%%%%%%%%%%%%%%%%%%-%%-%%%-%%%%-%%%%%-%%%%%%+% GHC.MaybeJustNothingGHC.BaseStringghc-prim GHC.TypesChar GHC.ClassesOrdcompareGTFloatDoubleEq:%