packages feed

barbies-2.0.2.0: barbies.cabal

name:           barbies
version:        2.0.2.0
synopsis:       Classes for working with types that can change clothes.
description:    Types that are parametric on a functor are like Barbies that have an outfit for each role. This package provides the basic abstractions to work with them comfortably.
category:       Data-structures
homepage:       https://github.com/jcpetruzza/barbies#readme
bug-reports:    https://github.com/jcpetruzza/barbies/issues
author:         Daniel Gorin
maintainer:     jcpetruzza@gmail.com
copyright:      2018 Daniel Gorin
license:        BSD3
license-file:   LICENSE
build-type:     Simple
cabal-version:  >= 1.10

extra-source-files:
    ChangeLog.md
    README.md

source-repository head
  type: git
  location: https://github.com/jcpetruzza/barbies

library

  exposed-modules:
      Barbies
      Barbies.Bare
      Barbies.Bi
      Barbies.Constraints
      Barbies.Internal

      Data.Functor.Barbie
      Data.Functor.Transformer

      -- Deprecated modules
      Data.Barbie
      Data.Barbie.Bare
      Data.Barbie.Constraints
      Data.Functor.Prod

  other-modules:
      Barbies.Generics.Applicative
      Barbies.Generics.Bare
      Barbies.Generics.Constraints
      Barbies.Generics.Distributive
      Barbies.Generics.Functor
      Barbies.Generics.Traversable

      Barbies.Internal.ApplicativeB
      Barbies.Internal.ApplicativeT

      Barbies.Internal.BareB
      Barbies.Internal.ConstraintsB
      Barbies.Internal.ConstraintsT
      Barbies.Internal.Containers
      Barbies.Internal.Dicts

      Barbies.Internal.DistributiveB
      Barbies.Internal.DistributiveT

      Barbies.Internal.FunctorB
      Barbies.Internal.FunctorT

      Barbies.Internal.MonadT

      Barbies.Internal.TraversableB
      Barbies.Internal.TraversableT

      Barbies.Internal.Trivial
      Barbies.Internal.Wear
      Barbies.Internal.Wrappers
      Barbies.Internal.Writer

      Data.Generics.GenericN

      -- To be removed
      Data.Barbie.Internal.Product
      Data.Barbie.Internal.ProductC

  hs-source-dirs:
      src

  build-depends:
      base >=4.11 && <5,
      distributive,
      transformers

  ghc-options: -Wall

  default-language: Haskell2010
  default-extensions:
      ConstraintKinds
    , DataKinds
    , DefaultSignatures
    , DeriveFunctor
    , DeriveFoldable
    , DeriveTraversable
    , DeriveGeneric
    , DeriveDataTypeable
    , EmptyCase
    , ExplicitForAll
    , FlexibleContexts
    , FlexibleInstances
    , GADTSyntax
    , KindSignatures
    , LambdaCase
    , MultiParamTypeClasses
    , Rank2Types
    , ScopedTypeVariables
    , StandaloneDeriving
    , TypeApplications
    , TypeOperators

test-suite barbies-test
  type: exitcode-stdio-1.0

  main-is: Spec.hs

  other-modules:
      TestBarbies
      TestBarbiesW
      TestBiBarbies
      Clothes
      Spec.Applicative
      Spec.Bare
      Spec.Constraints
      Spec.Distributive
      Spec.Functor
      Spec.Traversable
      Spec.Wrapper

  hs-source-dirs:
      test

  ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -O0

  build-depends:
      barbies
    , base >=4.7 && <5
    , distributive
    , QuickCheck
    , tasty
    , tasty-hunit
    , tasty-quickcheck

  default-language: Haskell2010
  default-extensions:
    DeriveDataTypeable
    DeriveGeneric
    KindSignatures
    LambdaCase
    Rank2Types
    ScopedTypeVariables
    StandaloneDeriving
    TypeApplications
    TypeOperators

-- This tests that the deprecated Data.Barbie interface
-- can still be used to build code writen against 1.x,
-- with deprecation warnings
test-suite barbies-test-legacy
  type: exitcode-stdio-1.0

  main-is: Legacy/Spec.hs

  other-modules:
      Legacy.TestBarbies
      Legacy.TestBarbiesW
      Legacy.Clothes
      Legacy.Spec.Bare
      Legacy.Spec.Constraints
      Legacy.Spec.Functor
      Legacy.Spec.Traversable
      Legacy.Spec.Product
      Legacy.Spec.Wrapper

  hs-source-dirs:
      test-legacy

  ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wno-deprecations -O0

  build-depends:
      barbies
    , base >=4.7 && <5
    , QuickCheck
    , tasty
    , tasty-hunit
    , tasty-quickcheck

  default-language: Haskell2010
  default-extensions:
    DeriveDataTypeable
    DeriveGeneric
    KindSignatures
    LambdaCase
    Rank2Types
    ScopedTypeVariables
    StandaloneDeriving
    TypeApplications
    TypeOperators