Îõ³h&Cø@€’      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘textual type classes'Copyright (c) 2019-2023 Travis CardwellMIT Safe-Inferred "<ÁÃÜã?²à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<ttcUnsafely parse=ttcUnsafely parse to a •>ttcUnsafely parse to strict –?ttcUnsafely parse to lazy —@ttcUnsafely parse to a Text ˜AttcUnsafely parse to a strict ™BttcUnsafely parse to a lazy šCttcUnsafely parse to a  ByteString ›DttcUnsafely parse to a œEttc Create a  result from a  error message and a  valueFttc Create a  result from a • error message and a  valueGttc Create a  result from a – error message and a  valueHttc Create a  result from a — error message and a  valueIttc Create a  result from a ˜ error message and a  valueJttc Create a  result from a ™ error message and a  valueKttc Create a  result from a š error message and a  valueLttc Create a  result from a › error message and a  valueMttc Create a  result from a œ error message and a  valueNttcAdd a prefix to  error messages of a  resultOttcAdd a prefix to • error messages of a  resultPttcAdd a prefix to – error messages of a  resultQttcAdd a prefix to — error messages of a  resultRttcAdd a prefix to ˜ error messages of a  resultSttcAdd a prefix to ™ error messages of a  resultTttcAdd a prefix to š error messages of a  resultUttcAdd a prefix to › error messages of a  resultVttcAdd a prefix to œ error messages of a  resultWttcParse 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.Xttc&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 matchYttcParse a value using the “ instanceZttcParse a value using the “ instance, with  error messages0The following English error message is returned:%"invalid {name}" when the parse fails[ttcParse a value to a  type using the “ instance\ttc Implement ž using W 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") _ttc,Validate a constant at compile-time using a  instanceThis function requires a   of the result type. Use ` 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 a 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") `ttcMake a valid function using _ 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 b 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") attc,Validate a constant at compile-time using a  instanceThis function requires a   of the result type. Use b 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") bttcMake a valid function using a 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") cttcMake a valid quasi-quoter using a 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|] Wttccase-insensitive when ¡ttcaccept unique prefixes when ¡ttcinvalid input errorttcambiguous input errorttctextual input to parsettcerror or parsed valueXttc!name to include in error messagesttccase-insensitive when ¡ttcaccept unique prefixes when ¡ttctextual input to parsettcerror or parsed valueYttcinvalid input errorttctextual input to parsettcerror or parsed valueZttc!name to include in error messagesttctextual input to parsettcerror or parsed value[ttctextual input to parsettcparsed value or ¢ if invalid\ttccase-insensitive when ¡ttcaccept unique prefixes when ¡ä   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcä  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc£      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™—š›—œžŸ ž¡ ž¢£¤¥¦¤§¦¤¨£¤©ª—«¬—­®¯°±—²³”•´—«µ¶"ttc-1.2.1.0-KTYLTLBLUwr6nnurDpGxQaData.TTC ParseDefault parseDefaultParseparse RenderDefault renderDefaultRenderrenderTextualtoStoTtoTLtoTLBtoBStoBSLtoBSBtoSBSconvertfromSfromTfromTLfromTLBfromBSfromBSLfromBSBfromSBSasSasTasTLasTLBasBSasBSLasBSBasSBSrenderSrenderTrenderTL renderTLBrenderBS renderBSL renderBSB renderSBSrenderWithShowparseSparseTparseTLparseTLBparseBSparseBSLparseBSBparseSBS parseMaybe parseMaybeS parseMaybeT parseMaybeTL parseMaybeTLB parseMaybeBS parseMaybeBSL parseMaybeBSB parseMaybeSBS 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$fParseDefaultCharghc-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.MaybeMaybeText.ParserCombinators.ReadPReadStemplate-haskellLanguage.Haskell.TH.SyntaxLift Data.ProxyProxyTrueNothing