@hackage vary0.1.0.5

Vary: Friendly and fast polymorphic variants (open unions/coproducts/extensible sums)

  • Installation

  • Dependencies (5)

  • Dependents (0)

  • Package Flags

      aeson
       (on by default)

      When enabled implements the FromJSON/ToJSON typeclasses from the aeson library. When disabled, does not depend on the aeson library.

      hashable
       (on by default)

      When enabled implements the Hashable typeclass from the hashable library. When disabled, does not depend on the hashable library.

      quickcheck
       (on by default)

      When enabled implements the Arbitrary typeclasses from the QuickCheck library. When disabled, does not depend on the QuickCheck library.

Vary: Friendly and fast Variant types for Haskell

Just like tuples are a version of a user-defined product type (only without the field names), a Variant is a version of a user-defined sum type (but without the field names).

Variant types are the generalization of Either. Especially in the situation where you want to handle multiple errors, Variant types are a great abstraction to use.

Variant types are sometimes called '_polymorphic_ variants' for disambiguation. They are also commonly known as (open) unions, coproducts or extensible sums.

Vary is lightweight on dependencies. With all library flags turned off, it only depends on base and deepseq.

Please see the full README below or on GitHub at https://github.com/qqwy/haskell-vary#readme