LicenseRef-PublicDomain licensed by James Cook
Maintained by Obsidian Systems, LLC
This version can be pinned in stack with:dependent-sum-template-0.2.0.1@sha256:98648074b81a100320b2206ecc132f1b962dae9f1b0f312386f0d9aaa816e79b,2169

Module documentation for 0.2.0.1

dependent-sum-template Build Status Hackage

This library defines Template Haskell functions for deriving the GEq, GCompare, GShow, and GRead functions from the some library.

  • GEq tag is similar to an Eq instance for tag a except that with geq, values of types tag a and tag b may be compared, and in the case of equality, evidence that the types a and b are equal is provided.

  • GCompare tag is similar to the above for Ord, and provides gcompare, giving a GOrdering that gives similar evidence of type equality when values match.

  • GShow tag means that tag a has (the equivalent of) a Show instance.

  • GRead tag means that tag a has (the equivalent of) a Read instance.

Changes

Revision history for dependent-sum-template

0.2.0.1 - 2023-12-06

  • Add back support for GHC 9.2 and 9.4.

    We were able to work around the bug in reifyInstances by using a data family instead of a type family.

0.2.0.0 - 2023-08-01

  • Recover compatibility with template-haskell 2.18, which was lost in 0.1.2.0
  • deriveGShow will generate code that uses Show instances for every argument to a constructor, apart from those of the type that it is generating an instance for.
  • Drop support for GHC 9.2 and 9.4 due to a bug in reifyInstances

0.1.2.0 - 2023-07-11

  • Rework a lot of the logic using th-abstraction to get structural information about data types and to normalize their representation. This should allow the deriving functions to work on a much wider range of types.

  • Change dependency to just be on some, not dependent-sum, as we just need the reexported classes.

0.1.1.1 - 2021-12-30

  • Fix warning with GHC 9.2 about non-canonical return.

0.1.1.0 revision 1 - 2021-11-30

  • Add bound to th-abstraction to prevent build failure.

0.1.1.0 - 2021-11-25

  • Support GHC 9.0

0.1.0.3 - 2020-03-24

  • Relax version bounds on dependent-sum to include 0.7.

0.1.0.2 - 2020-03-23

  • Update GitHub repository in cabal metadata.

0.1.0.1 - 2020-03-21

  • Support GHC 8.8.

0.1.0.0 - 2019-03-21

  • Remove code for generating instances of *Tag classes, as they were removed in dependent-sum-0.6.