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

Module documentation for

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.


Revision history for dependent-sum-template - 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. - 2023-08-01

  • Recover compatibility with template-haskell 2.18, which was lost in
  • 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 - 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. - 2021-12-30

  • Fix warning with GHC 9.2 about non-canonical return. revision 1 - 2021-11-30

  • Add bound to th-abstraction to prevent build failure. - 2021-11-25

  • Support GHC 9.0 - 2020-03-24

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

  • Update GitHub repository in cabal metadata. - 2020-03-21

  • Support GHC 8.8. - 2019-03-21

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