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 Textual type 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 Render type class is used to render a value as text. Avoid bugs by only using Show for debugging/development purposes.
    • ๐Ÿ“œ The Parse type class is used to parse a value from text. Unlike Read, it has support for error messages.
    • ๐Ÿ“œ Validate constants at compile-time using Parse instances.

    ๐Ÿ‘€ 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.yaml configuration:

    extra-deps:
      -ttc-1.5.0.1
    

    Issues

    There are no known issues at this time.


Previous changes from v1.5.0.0

  • Overview

    TTC, an initialism of Textual Type Classes, is a library that provides the following functionality:

    • The Textual type 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 Render type class is used to render a value as text. Avoid bugs by only using Show for debugging/development purposes.
    • ๐Ÿ“œ The Parse type class is used to parse a value from text. Unlike Read, it has support for error messages.
    • ๐Ÿ“œ Validate constants at compile-time using Parse instances.

    ๐Ÿ‘€ 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.Wrapper defines TTC instances for newtype wrappers around textual data types. This makes it trivial to add TTC support for such data types, using deriving via, reducing the temptation to just use Show instances in early development of a project.

    TypeApplications Changes

    ๐Ÿ›  TTC provides type-specific functions using suffixes to indicate the type, like in withErrorT, so that users can avoid TypeApplications if desired. This is possible because the supported textual data types is fixed. The new library instead encourages use of TypeApplications, 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 RenderDefault and ParseDefault instances for TLB.Builder, ST.ShortText, BSB.Builder, and SBS.ShortByteString are added.

    0๏ธโƒฃ RenderDefault and ParseDefault instances for Bool are added.

    0๏ธโƒฃ Default Instances

    0๏ธโƒฃ TTC provides default Render and Parse instances 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 .cabal file 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.yaml configuration:

    extra-deps:
      -ttc-1.5.0.0
    

    Issues

    There are no known issues at this time.