packages feed

functora-witch-1.2.0.2: functora-witch.cabal

cabal-version: 2.2
name:          functora-witch
version:       1.2.0.2
synopsis:      Convert values from one type into another.
description:
  A fork of the __witch__ library, without dependencies on __time__ and __template-haskell__. Compatible with a broader range of GHC, GHCJS, and GHC WASM compilers.

build-type:    Simple
category:      Data
license:       MIT
maintainer:    functora@proton.me

source-repository head
  location:
    https://github.com/functora/functora.github.io/tree/master/pub/functora-witch

  type:     git

flag pedantic
  default:     False
  description: Enables @-Werror@, which turns warnings into errors.
  manual:      True

common library
  build-depends:
    , base        >=4.16.0 && <4.19
    , bytestring  >=0.11.3 && <0.12
    , containers  >=0.6.5  && <0.7
    , tagged      >=0.8.6  && <0.9
    , text        >=1.2.5  && <1.3  || >=2.0 && <2.1

  default-language: Haskell2010
  ghc-options:
    -Weverything -Wno-all-missed-specialisations -Wno-implicit-prelude
    -Wno-missed-specialisations -Wno-missing-deriving-strategies
    -Wno-missing-export-lists -Wno-missing-exported-signatures
    -Wno-redundant-constraints -Wno-safe -Wno-unsafe

  if impl(ghc >=8.10.7)
    ghc-options:
      -Wno-prepositive-qualified-module -Wno-missing-safe-haskell-mode
      -Wno-missing-kind-signatures

  if flag(pedantic)
    ghc-options: -Werror

common executable
  import:        library
  build-depends: functora-witch
  ghc-options:   -rtsopts -threaded

library
  import:          library
  exposed-modules:
    Functora.Witch
    Functora.Witch.Encoding
    Functora.Witch.From
    Functora.Witch.Instances
    Functora.Witch.TryFrom
    Functora.Witch.TryFromException
    Functora.Witch.Utility

  hs-source-dirs:  source/library

test-suite functora-witch-test-suite
  import:         executable
  build-depends:
    , HUnit         >=1.6.1 && <1.7
    , transformers  >=0.5.6 && <0.7

  hs-source-dirs: source/test-suite
  main-is:        Main.hs
  type:           exitcode-stdio-1.0