vary-0.1.1.2: vary.cabal
cabal-version: 1.12
-- This file has been generated from package.yaml by hpack version 0.35.2.
--
-- see: https://github.com/sol/hpack
name: vary
version: 0.1.1.2
synopsis: Vary: Friendly and fast polymorphic variants (open unions/coproducts/extensible sums)
description: 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>
category: Data, Data Structures, Error Handling
homepage: https://github.com/qqwy/haskell-vary#readme
bug-reports: https://github.com/qqwy/haskell-vary/issues
author: Marten Wijnja (Qqwy)
maintainer: qqwy@gmx.com
copyright: 2024 Marten Wijnja (Qqwy)
license: MIT
license-file: LICENSE
build-type: Simple
extra-source-files:
README.md
CHANGELOG.md
source-repository head
type: git
location: https://github.com/qqwy/haskell-vary
flag aeson
description: When enabled implements the @FromJSON@/@ToJSON@ typeclasses from the aeson library. When disabled, does not depend on the aeson library.
manual: True
default: True
flag binary
description: When enabled implements the @Binary@ typeclass from the binary library. When disabled, does not depend on the binary library.
manual: True
default: True
flag cereal
description: When enabled implements the @Serialize@ typeclass from the cereal library. When disabled, does not depend on the cereal library.
manual: True
default: True
flag hashable
description: When enabled implements the @Hashable@ typeclass from the hashable library. When disabled, does not depend on the @hashable@ library.
manual: True
default: True
flag quickcheck
description: When enabled implements the @Arbitrary@ typeclasses from the QuickCheck library. When disabled, does not depend on the QuickCheck library.
manual: True
default: True
library
exposed-modules:
Vary
Vary.Utils
Vary.VEither
other-modules:
Vary.Core
hs-source-dirs:
src
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints
build-depends:
base >=4.7 && <5
, deepseq >=1.4.0 && <1.6
default-language: Haskell2010
if flag(hashable)
cpp-options: -DFLAG_HASHABLE
build-depends:
hashable >=1.3.0 && <1.6
if flag(aeson)
cpp-options: -DFLAG_AESON
build-depends:
aeson >=2.0.0 && <2.3
if flag(binary)
cpp-options: -DFLAG_BINARY
build-depends:
binary >=0.8.0.0 && <0.9.0.0
if flag(cereal)
cpp-options: -DFLAG_CEREAL
build-depends:
cereal >=0.5.0.0 && <0.6.0.0
if flag(quickcheck)
cpp-options: -DFLAG_QUICKCHECK
build-depends:
QuickCheck >=2.12 && <2.16
test-suite doctests
type: exitcode-stdio-1.0
main-is: doctests.hs
other-modules:
Paths_vary
hs-source-dirs:
test/doctest
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N
build-depends:
base >=4.7 && <5
, deepseq >=1.4.0 && <1.6
, doctest-parallel
, vary
default-language: Haskell2010
if flag(hashable)
cpp-options: -DFLAG_HASHABLE
build-depends:
hashable >=1.3.0 && <1.6
if flag(aeson)
cpp-options: -DFLAG_AESON
build-depends:
aeson >=2.0.0 && <2.3
if flag(binary)
cpp-options: -DFLAG_BINARY
build-depends:
binary >=0.8.0.0 && <0.9.0.0
if flag(cereal)
cpp-options: -DFLAG_CEREAL
build-depends:
cereal >=0.5.0.0 && <0.6.0.0
if flag(quickcheck)
cpp-options: -DFLAG_QUICKCHECK
build-depends:
QuickCheck >=2.12 && <2.16
test-suite readme
type: exitcode-stdio-1.0
main-is: test/README.lhs
other-modules:
Paths_vary
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -pgmL markdown-unlit -Wno-deferred-type-errors -Wno-missing-signatures -Wno-unused-matches -Wno-redundant-constraints -Wno-unused-imports -Wno-missing-export-lists
build-tool-depends:
markdown-unlit:markdown-unlit
build-depends:
base >=4.7 && <5
, deepseq >=1.4.0 && <1.6
, hspec
, markdown-unlit
, should-not-typecheck
, vary
default-language: Haskell2010
if flag(hashable)
cpp-options: -DFLAG_HASHABLE
build-depends:
hashable >=1.3.0 && <1.6
if flag(aeson)
cpp-options: -DFLAG_AESON
build-depends:
aeson >=2.0.0 && <2.3
if flag(binary)
cpp-options: -DFLAG_BINARY
build-depends:
binary >=0.8.0.0 && <0.9.0.0
if flag(cereal)
cpp-options: -DFLAG_CEREAL
build-depends:
cereal >=0.5.0.0 && <0.6.0.0
if flag(quickcheck)
cpp-options: -DFLAG_QUICKCHECK
build-depends:
QuickCheck >=2.12 && <2.16
test-suite vary-test
type: exitcode-stdio-1.0
main-is: spec.hs
other-modules:
Paths_vary
hs-source-dirs:
test/spec
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N
build-depends:
QuickCheck >=2.12 && <2.16
, aeson >=2.0.0 && <2.3
, base >=4.7 && <5
, binary
, bytestring
, cereal
, deepseq >=1.4.0 && <1.6
, hspec
, vary
default-language: Haskell2010
if flag(hashable)
cpp-options: -DFLAG_HASHABLE
build-depends:
hashable >=1.3.0 && <1.6
if flag(aeson)
cpp-options: -DFLAG_AESON
build-depends:
aeson >=2.0.0 && <2.3
if flag(binary)
cpp-options: -DFLAG_BINARY
build-depends:
binary >=0.8.0.0 && <0.9.0.0
if flag(cereal)
cpp-options: -DFLAG_CEREAL
build-depends:
cereal >=0.5.0.0 && <0.6.0.0
if flag(quickcheck)
cpp-options: -DFLAG_QUICKCHECK
build-depends:
QuickCheck >=2.12 && <2.16