LicenseRef-PublicDomain licensed and maintained by James Cook

Module documentation for 0.4

There are no documented modules for this package.

A dependent sum is a generalization of a particular way of thinking about the Either type. Either a b can be thought of as a 2-tuple (tag, value), where the value of the tag determines the type of the value. In particular, either tag = Left and value :: a or tag = Right and value :: b.

This package allows you to define your own dependent sum types by using your own "tag" types.


Revision history for dependent-sum

  • Make Some a newtype with associated pattern synonyms using unsafeCoerce to avoid the GADT performance overhead. This shouldn’t affect users.
  • Deprecate the constructor name This in favor of Some.
  • Drop support for GHC older than 8.0.
comments powered byDisqus