ttc v1.5.0.1 Release Notes
Release Date: 2026-01-10 // 5 months ago-
Overview
TTC, an initialism of Textual Type Classes, is a library that provides the following functionality:
- The
Textualtype class is used to convert between common textual data types. It can be used to write functions that accept or return values of any of these textual data types. - The
Rendertype class is used to render a value as text. Avoid bugs by only usingShowfor debugging/development purposes. - ๐ The
Parsetype class is used to parse a value from text. UnlikeRead, it has support for error messages. - ๐ Validate constants at compile-time using
Parseinstances.
๐ See the README for details.
๐ This Release
๐ This is a maintenance release that adds compatibility with GHC 9.14.1. There are no changes to the API or CLI.
Compatibility
๐ GHC versions 8.8.4 through 9.14.1 are supported. Note that GHC 9.12.3 is not tested, however, because it has critical issues and is not available using GHCup.
๐ Cabal version 3.0 through 3.16.1.0 are supported.
๐ To use this release with a Stackage snapshot that does not include it, add the following to your
stack.yamlconfiguration:extra-deps: -ttc-1.5.0.1Issues
There are no known issues at this time.
- The
Previous changes from v1.5.0.0
-
Overview
TTC, an initialism of Textual Type Classes, is a library that provides the following functionality:
- The
Textualtype class is used to convert between common textual data types. It can be used to write functions that accept or return values of any of these textual data types. - The
Rendertype class is used to render a value as text. Avoid bugs by only usingShowfor debugging/development purposes. - ๐ The
Parsetype class is used to parse a value from text. UnlikeRead, it has support for error messages. - ๐ Validate constants at compile-time using
Parseinstances.
๐ See the README for details.
๐ This Release
๐ A new generation of this library is under development. It will be released as a separate package, and TTC will still be maintained, so TTC users will not be forced to upgrade. Some features are being backported to TTC, when possible. This release contains a number of these changes, in addition to the usual maintenance (compatibility) changes.
โ Added Wrappers
๐ Module
Data.TTC.Wrapperdefines TTC instances fornewtypewrappers around textual data types. This makes it trivial to add TTC support for such data types, usingderiving via, reducing the temptation to just useShowinstances in early development of a project.TypeApplicationsChanges๐ TTC provides type-specific functions using suffixes to indicate the type, like in
withErrorT, so that users can avoidTypeApplicationsif desired. This is possible because the supported textual data types is fixed. The new library instead encourages use ofTypeApplications, and the type argument order of some functions is changes to make doing so easier. These changes are backported to TTC for consistency.If you use TTC with
TypeApplications, you may need to change the order of type arguments in some places.โ Added Instances
๐ Missing
RenderDefaultandParseDefaultinstances forTLB.Builder,ST.ShortText,BSB.Builder, andSBS.ShortByteStringare added.0๏ธโฃ
RenderDefaultandParseDefaultinstances forBoolare added.0๏ธโฃ Default Instances
0๏ธโฃ TTC provides default
RenderandParseinstances for common data types, allowing users to optionally load them.๐ This release adds Template Haskell functions that can do the same thing. One benefit is that it is more concise when loading default instances for many types.
Compatibility
TTC is currently tested with GHC 8.8.4 through GHC 9.12.1. The
.cabalfile uses Cabal version 3.0.0.0 (included in GHC 8.8.4), so it should build fine on relatively old Haskell installations as well as current installations. Note that support for software released more than five years ago has been removed.๐ To use this release with a Stackage snapshot that does not include it, add the following to your
stack.yamlconfiguration:extra-deps: -ttc-1.5.0.0Issues
There are no known issues at this time.
- The