packages feed

optics-0.3: optics.cabal

name:            optics
version:         0.3
license:         BSD3
license-file:    LICENSE
build-type:      Simple
maintainer:      optics@well-typed.com
author:          Adam Gundry, Andres Löh, Andrzej Rybczak, Oleg Grenrus
cabal-version:   1.24
tested-with:     ghc ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.3 || ==8.10.1, GHCJS ==8.4
synopsis:        Optics as an abstract interface
category:        Data, Optics, Lenses
description:
  This package makes it possible to define and use Lenses, Traversals, Prisms
  and other optics, using an abstract interface. See the main module "Optics"
  for the documentation.
  .

  This is the "batteries-included" variant with many dependencies; see the
  @<https://hackage.haskell.org/package/optics-core optics-core>@ package and
  other @optics-*@ dependencies if you need a more limited dependency footprint.
  .
  Note: Hackage does not yet display documentation for reexported-modules,
  but you can start from the "Optics" module documentation or see the module
  list in @<https://hackage.haskell.org/package/optics-core optics-core>@.

extra-doc-files:
  diagrams/*.png
  CHANGELOG.md

bug-reports:   https://github.com/well-typed/optics/issues
source-repository head
  type:     git
  location: https://github.com/well-typed/optics.git
  subdir:   optics

library
  default-language:   Haskell2010
  hs-source-dirs:     src
  ghc-options:        -Wall

  build-depends: base                   >= 4.9       && <5
               , array                  >= 0.5.1.1   && <0.6
               , containers             >= 0.5.7.1   && <0.7
               , mtl                    >= 2.2.2     && <2.3
               , optics-core            >= 0.3       && <0.3.1
               , optics-extra           >= 0.3       && <0.3.1
               , optics-th              >= 0.3       && <0.3.1
               , transformers           >= 0.5       && <0.6

  -- main module to land with repl
  exposed-modules:    Optics

  -- main optic type
  reexported-modules: Optics.Optic

  -- optic flavours
  reexported-modules: Optics.AffineFold
                    , Optics.AffineTraversal
                    , Optics.Fold
                    , Optics.Getter
                    , Optics.Iso
                    , Optics.IxAffineFold
                    , Optics.IxAffineTraversal
                    , Optics.IxFold
                    , Optics.IxGetter
                    , Optics.IxLens
                    , Optics.IxSetter
                    , Optics.IxTraversal
                    , Optics.Lens
                    , Optics.Prism
                    , Optics.ReversedLens
                    , Optics.ReversedPrism
                    , Optics.Review
                    , Optics.Setter
                    , Optics.Traversal

  -- optics utilities
  reexported-modules: Optics.Arrow
                    , Optics.At
                    , Optics.Coerce
                    , Optics.Cons
                    , Optics.Each
                    , Optics.Empty
                    , Optics.Indexed
                    , Optics.Label
                    , Optics.Mapping
                    , Optics.Operators
                    , Optics.Operators.Unsafe
                    , Optics.Passthrough
                    , Optics.Re
                    , Optics.ReadOnly
                    , Optics.State
                    , Optics.State.Operators
                    , Optics.View
                    , Optics.Zoom

  -- template haskell support
  reexported-modules: Optics.TH

  -- data specific optics
  reexported-modules: Data.ByteString.Lazy.Optics
                    , Data.ByteString.Optics
                    , Data.ByteString.Strict.Optics
                    , Data.Either.Optics
                    , Data.HashMap.Optics
                    , Data.HashSet.Optics
                    , Data.IntMap.Optics
                    , Data.IntSet.Optics
                    , Data.List.Optics
                    , Data.Map.Optics
                    , Data.Maybe.Optics
                    , Data.Sequence.Optics
                    , Data.Set.Optics
                    , Data.Text.Lazy.Optics
                    , Data.Text.Optics
                    , Data.Text.Strict.Optics
                    , Data.Tree.Optics
                    , Data.Tuple.Optics
                    , Data.Typeable.Optics
                    , Data.Vector.Generic.Optics
                    , Data.Vector.Optics
                    , GHC.Generics.Optics
                    , Numeric.Optics

test-suite optics-tests
  default-language: Haskell2010
  hs-source-dirs:   tests
  ghc-options:      -Wall

  -- inspection-testing doesn't compile with GHCJS
  if impl(ghcjs)
    buildable: False

  build-depends: base
               , containers
               , indexed-profunctors    >= 0.1        && <0.2
               , inspection-testing     >= 0.4.1.1    && <0.5
               , mtl
               , optics
               , optics-core
               , QuickCheck
               , random
               , tasty
               , tasty-hunit
               , tasty-quickcheck
               , template-haskell

  type:    exitcode-stdio-1.0
  main-is: Optics/Tests.hs

  other-modules: Optics.Tests.Computation
                 Optics.Tests.Core
                 Optics.Tests.Eta
                 Optics.Tests.Labels
                 Optics.Tests.Misc
                 Optics.Tests.Properties
                 Optics.Tests.Utils

-- Benchmarking folds
benchmark folds
  default-language: Haskell2010
  hs-source-dirs:   benchmarks
  ghc-options:      -Wall -threaded

  -- GHCJS takes forever to compile dependencies
  if impl(ghcjs)
    buildable: False

  build-depends: base
               , bytestring
               , containers
               , criterion
               , lens
               , optics
               , unordered-containers
               , vector

  type:    exitcode-stdio-1.0
  main-is: folds.hs

-- Benchmarking traversals
benchmark traversals
  default-language: Haskell2010
  hs-source-dirs:   benchmarks
  ghc-options:      -Wall -threaded

  -- GHCJS takes forever to compile dependencies
  if impl(ghcjs)
    buildable: False

  build-depends: base
               , bytestring
               , containers
               , criterion
               , lens
               , optics
               , transformers
               , unordered-containers
               , vector

  type:    exitcode-stdio-1.0
  main-is: traversals.hs