Îõ³h&KàH$œ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›textual type classes'Copyright (c) 2019-2023 Travis CardwellMIT Safe-Inferred "<ÁÃÜãGDêttcThe " type class provides some default  instances.The œ* instance parses single-character strings.+Numeric type instances all parse using the  instance.3Textual type instances all convert from the source  data type.ttcThe 8 type class parses a data type from a textual data type.'There are no default instances for the Š type class, so that all instances can be customized per project when desired. Instances for some basic data types are defined for the , type class, however, and you can load the  instance as follows: instance TTC.Parse Int µSince a type may have at most one instance of a given type class, special care must be taken when defining type class instances in a shared library. In particular, orphan instances should generally not be used in shared libraries since they prevent users of the libraries from writing their own instances.See the uname and prompt example programs in the examples directory..For more details, see the following article: Éhttps://www.extrema.is/articles/ttc-textual-type-classes/render-and-parsettcThe " type class provides some default  instances.The œ, instance renders a single-character string.,Numeric type instances all render using the ž instance.1Textual type instances all convert to the target  data type.ttcThe 7 type class renders a data type as a textual data type.'There are no default instances for the Š type class, so that all instances can be customized per project when desired. Instances for some basic data types are defined for the , type class, however, and you can load the  instance as follows: instance TTC.Render Int µSince a type may have at most one instance of a given type class, special care must be taken when defining type class instances in a shared library. In particular, orphan instances should generally not be used in shared libraries since they prevent users of the libraries from writing their own instances.See the uname and prompt example programs in the examples directory..For more details, see the following article: Éhttps://www.extrema.is/articles/ttc-textual-type-classes/render-and-parsettcThe É type class is used to convert between the following textual data types:Ÿ (S)Strict   (T)Lazy ¡ (TL)Text ¢ (TLB)Strict £ (BS)Lazy ¤ (BSL) ByteString ¥ (BSB ) (Note: Data.Binary.Builder2 re-exports this type, so TTC can be used with binary as well.)¦ (SBS) ByteStringò values are assumed to be UTF-8 encoded text. Invalid bytes are replaced with the Unicode replacement character U+FFFD;. In cases where different behavior is required, process  ByteString values before using this class.%This type class has two key features:Type conversion is not$ done through a fixed type (such as Ÿ or  ).¦It has a single type variable, making it easy to write functions that accept arguments and/or return values that may be any of the supported textual data types.·Note that support for additional data types cannot be implemented by writing instances. Adding support for additional data types would require changing the class definition itself..For more details, see the following article: Ëhttps://www.extrema.is/articles/ttc-textual-type-classes/textual-type-class ttc Convert to a Ÿ ttcConvert to strict   ttcConvert to lazy ¡ ttc Convert to a Text ¢ ttcConvert to a strict £ttcConvert to a lazy £ttc Convert to a  ByteString ¥ttc Convert to a ¦ttc0Convert between any supported textual data typesttcConvert from a ŸttcConvert from strict  ttcConvert from lazy ¡ttcConvert from a Text ¢ttcConvert from a strict £ttcConvert from a lazy ¤ttcConvert from a  ByteString ¢ttcConvert from a ¦ttcConvert an argument to a ŸttcConvert an argument to strict  ttcConvert an argument to lazy ¡ttcConvert an argument to a Text ¢ttc Convert an argument to a strict £ttcConvert an argument to a lazy ¤ ttcConvert an argument to a  ByteString ¢!ttcConvert an argument to a ¦"ttc Render to a Ÿ#ttcRender to strict  $ttcRender to lazy ¡%ttc Render to a Text ¢&ttcRender to a strict £'ttcRender to a lazy ¤(ttc Render to a  ByteString ¥)ttc Render to a ¦*ttc0Render a value to a textual data type using the ž instance+ttc Parse from a Ÿ,ttcParse from strict  -ttcParse from lazy ¡.ttc Parse from a Text ¢/ttcParse from a strict £0ttcParse from a lazy ¤1ttc Parse from a  ByteString ¥2ttc Parse from a ¦3ttc Parse to a § type4ttc Parse from a Ÿ to a § type5ttcParse from strict   to a § type6ttcParse from lazy ¡ to a § type7ttc Parse from a Text ¢ to a § type8ttcParse from a strict £ to a § type9ttcParse from a lazy ¤ to a § type:ttc Parse from a  ByteString ¥ to a § type;ttc Parse from a ¦ to a § type<ttcParse or fail using ¨=ttc Parse from a Ÿ or fail using ¨>ttcParse from strict   or fail using ¨?ttcParse from lazy ¡ or fail using ¨@ttc Parse from a Text ¢ or fail using ¨AttcParse from a strict £ or fail using ¨BttcParse from a lazy ¤ or fail using ¨Cttc Parse from a  ByteString ¥ or fail using ¨Dttc Parse from a ¦ or fail using ¨EttcUnsafely parseFttcUnsafely parse from a ŸGttcUnsafely parse from strict  HttcUnsafely parse from lazy ¡IttcUnsafely parse from a Text ¢JttcUnsafely parse from a strict £KttcUnsafely parse from a lazy ¤LttcUnsafely parse from a  ByteString ¥MttcUnsafely parse from a ¦Nttc Create a  result from a  error message and a § valueOttc Create a  result from a Ÿ error message and a § valuePttc Create a  result from a   error message and a § valueQttc Create a  result from a ¡ error message and a § valueRttc Create a  result from a ¢ error message and a § valueSttc Create a  result from a £ error message and a § valueTttc Create a  result from a ¤ error message and a § valueUttc Create a  result from a ¥ error message and a § valueVttc Create a  result from a ¦ error message and a § valueWttcAdd a prefix to  error messages of a  resultXttcAdd a prefix to Ÿ error messages of a  resultYttcAdd a prefix to   error messages of a  resultZttcAdd a prefix to ¡ error messages of a  result[ttcAdd a prefix to ¢ error messages of a  result\ttcAdd a prefix to £ error messages of a  result]ttcAdd a prefix to ¤ error messages of a  result^ttcAdd a prefix to ¥ error messages of a  result_ttcAdd a prefix to ¦ error messages of a  result`ttcParse a value in an enumerationöThis function is intended to be used with types that have few choices, as the implementation uses a linear algorithm.See the enum example program in the examples directory.attc&Parse a value in an enumeration, with  error messages2The following English error messages are returned:*"invalid {name}" when there are no matches4"ambiguous {name}" when there is more than one matchbttcParse a value using the  instancecttcParse a value using the  instance, with  error messages0The following English error message is returned:%"invalid {name}" when the parse failsdttcParse a value to a § type using the  instanceettc Implement © using ` String -> THS.Code m a ÄThe type of this function in previous versions of GHC is as follows: Ãvalid :: (Parse a, THS.Lift a) => String -> TH.Q (TH.TExp a) ÁThis function is used the same way in all GHC versions. See the valid, invalid, and lift example programs in the examples6 directory. The following is example usage from the valid example: 2sample :: Username sample = $$(TTC.valid "tcard") httc,Validate a constant at compile-time using a  instanceThis function requires a « of the result type. Use i to avoid having to pass a « during constant definition.This function parses the Ÿà at compile-time and fails compilation on error. When valid, the ŸÛ is compiled in, to be parsed again at run-time. Since the result is not compiled in, no ª instance is required.âThis function uses a Template Haskell typed expression. Typed expressions were not supported in haskell-src-exts <1.22.0., which causes problems with old versions of hlint". If the issue affects you, use hlint -i "Parse error" to ignore parse errors or use j instead.«Note that the typed Template Haskell API changed in GHC 9. The type displayed in this documentation is determined by the version of GHC used to build the documentation.:The type of this function in GHC 9 or later is as follows: ÜvalidOf :: (MonadFail m, THS.Quote m, Parse a) => Proxy a -> String -> THS.Code m a ÄThe type of this function in previous versions of GHC is as follows: ÄvalidOf :: Parse a => Proxy a -> String -> TH.Q (TH.TExp a) ÁThis function is used the same way in all GHC versions. See the validof example program in the examples6 directory. The following is example usage from the validof example: Îsample :: Username sample = $$(TTC.validOf (Proxy :: Proxy Username) "tcard") ittcMake a valid function using h for the given type Create a valid: function for a type in order to avoid having to write a « when defining constants.âThis function uses a Template Haskell typed expression. Typed expressions were not supported in haskell-src-exts <1.22.0., which causes problems with old versions of hlint". If the issue affects you, use hlint -i "Parse error" to ignore parse errors or use k instead.«Note that the typed Template Haskell API changed in GHC 9. The type displayed in this documentation is determined by the version of GHC used to build the documentation.The type of the created valid* function in GHC 9 or later is as follows: Û$funName :: forall m. (MonadFail m, THS.Quote m) => String -> THS.Code m $resultType The type of the created valid5 function in previous versions of GHC is as follows: 5$funName :: String -> TH.Q (TH.TExp $resultType) ÁThis function is used the same way in all GHC versions. See the mkvalid example program in the examples6 directory. The following is example usage from the mkvalid example: "$(TTC.mkValid "valid" ''Username)  The created valid& function can then be used as follows: 7sample :: Username sample = $$(Username.valid "tcard") jttc,Validate a constant at compile-time using a  instanceThis function requires a « of the result type. Use k to avoid having to pass a « during constant definition.This function parses the Ÿà at compile-time and fails compilation on error. When valid, the ŸÛ is compiled in, to be parsed again at run-time. Since the result is not compiled in, no ª instance is required.See the uvalidof example program in the examples6 directory. The following is example usage from the uvalidof example: Ôsample :: Username sample = $(TTC.untypedValidOf (Proxy :: Proxy Username) "tcard") kttcMake a valid function using j for the given type Create a valid: function for a type in order to avoid having to write a « when defining constants.See the mkuvalid example program in the examples6 directory. The following is example usage from the mkuvalid example: )$(TTC.mkUntypedValid "valid" ''Username)  The created valid& function can then be used as follows: 6sample :: Username sample = $(Username.valid "tcard") lttcMake a valid quasi-quoter using j for the given typeSee the uvalidqq example program in the examples6 directory. The following is example usage from the uvalidqq example: +$(TTC.mkUntypedValidQQ "valid" ''Username)  The created valid& function can then be used as follows: 4sample :: Username sample = [Username.valid|tcard|] ›ttcThis instance enables use of g without having to type valid. The  Ïhttps://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/overloaded_strings.htmlOverloadedStrings€ extension must be enabled in the module where this functionality is used. Note that this reduces the number of characters in the code, but it can also make the code more difficult to understand by somebody who is not already familiar with it. Typing validÄ gives people a way to investigate and understand what is going on.«Note that the typed Template Haskell API changed in GHC 9. The type displayed in this documentation is determined by the version of GHC used to build the documentation.:The type of this instance in GHC 9 or later is as follows: Ë(MonadFail m, THS.Quote m, Parse a, THS.Lift a) => IsString (THS.Code m a) ÄThe type of this instance in previous versions of GHC is as follows: 5(Parse a, THS.Lift a) => IsString (TH.Q (TH.TExp a)) õThis functionality can be used as follows in all supported versions of GHC. The following is example usage from the valid example: *sample2 :: Username sample2 = $$("alice") ×The parenthesis are not required from GHC 9. The following is example usage from the valid example: (sample2 :: Username sample2 = $$"alice" `ttccase-insensitive when ¬ttcaccept unique prefixes when ¬ttcinvalid input errorttcambiguous input errorttctextual input to parsettcerror or parsed valueattc!name to include in error messagesttccase-insensitive when ¬ttcaccept unique prefixes when ¬ttctextual input to parsettcerror or parsed valuebttcinvalid input errorttctextual input to parsettcerror or parsed valuecttc!name to include in error messagesttctextual input to parsettcerror or parsed valuedttctextual input to parsettcparsed value or ­ if invalidettccase-insensitive when ¬ttcaccept unique prefixes when ¬í   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklí  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl®      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¡¤¥¡¦§¨©ª¨«ª¨¬­®¯°®±°®²­®³´¡µ¶¡·¸¡¹º»¼½¡¾¿žŸÀ¡µÁÂ"ttc-1.3.0.0-BsCK7LGhW4G7CGLPvWC3sfData.TTC ParseDefault parseDefaultParseparse RenderDefault renderDefaultRenderrenderTextualtoStoTtoTLtoTLBtoBStoBSLtoBSBtoSBSconvertfromSfromTfromTLfromTLBfromBSfromBSLfromBSBfromSBSasSasTasTLasTLBasBSasBSLasBSBasSBSrenderSrenderTrenderTL renderTLBrenderBS renderBSL renderBSB renderSBSrenderWithShowparseSparseTparseTLparseTLBparseBSparseBSLparseBSBparseSBS parseMaybe parseMaybeS parseMaybeT parseMaybeTL parseMaybeTLB parseMaybeBS parseMaybeBSL parseMaybeBSB parseMaybeSBS parseOrFail parseOrFailS parseOrFailT parseOrFailTLparseOrFailTLB parseOrFailBSparseOrFailBSLparseOrFailBSBparseOrFailSBS parseUnsafe parseUnsafeS parseUnsafeT parseUnsafeTLparseUnsafeTLB parseUnsafeBSparseUnsafeBSLparseUnsafeBSBparseUnsafeSBS withError withErrorS withErrorT withErrorTL withErrorTLB withErrorBS withErrorBSL withErrorBSB withErrorSBS prefixError prefixErrorS prefixErrorT prefixErrorTLprefixErrorTLB prefixErrorBSprefixErrorBSLprefixErrorBSBprefixErrorSBS parseEnum parseEnum' parseWithReadparseWithRead'maybeParseWithRead readsEnumreadsWithParsevalidvalidOfmkValiduntypedValidOfmkUntypedValidmkUntypedValidQQ$fTextualShortByteString$fTextualBuilder$fTextualByteString$fTextualByteString0$fTextualBuilder0 $fTextualText$fTextualText0 $fTextual[]$fRenderDefaultText$fRenderDefaultText0$fRenderDefaultByteString$fRenderDefaultByteString0$fRenderDefault[]$fRenderDefaultWord64$fRenderDefaultWord32$fRenderDefaultWord16$fRenderDefaultWord8$fRenderDefaultWord$fRenderDefaultInteger$fRenderDefaultInt64$fRenderDefaultInt32$fRenderDefaultInt16$fRenderDefaultInt8$fRenderDefaultInt$fRenderDefaultFloat$fRenderDefaultDouble$fRenderDefaultChar$fParseDefaultText$fParseDefaultText0$fParseDefaultByteString$fParseDefaultByteString0$fParseDefault[]$fParseDefaultWord64$fParseDefaultWord32$fParseDefaultWord16$fParseDefaultWord8$fParseDefaultWord$fParseDefaultInteger$fParseDefaultInt64$fParseDefaultInt32$fParseDefaultInt16$fParseDefaultInt8$fParseDefaultInt$fParseDefaultFloat$fParseDefaultDouble$fParseDefaultChar$fIsStringCodeghc-prim GHC.TypesCharbaseGHC.ReadReadGHC.ShowShowGHC.BaseString text-1.2.5.0Data.Text.InternalTextData.Text.Internal.LazyData.Text.Internal.BuilderBuilderbytestring-0.11.3.1Data.ByteString.Internal ByteStringData.ByteString.Lazy.Internal Data.ByteString.Builder.InternalData.ByteString.Short.InternalShortByteString GHC.MaybeMaybeControl.Monad.Fail MonadFailText.ParserCombinators.ReadPReadStemplate-haskellLanguage.Haskell.TH.SyntaxLift Data.ProxyProxyTrueNothing