cabal-version:      2.4
name:               fresnel
version:            0.0.0.2
synopsis:           high-powered optics in a small package
description:        fresnel offers (non-indexed) profunctor optics composed with the lowly . operator.
homepage:           https://github.com/fresnel/fresnel
bug-reports:        https://github.com/fresnel/fresnel/issues
license:            BSD-3-Clause
license-file:       LICENSE
author:             Rob Rix
maintainer:         rob.rix@me.com

copyright:          2021–2023 Rob Rix
category:           Control
extra-doc-files:
  CHANGELOG.md
  README.md

common common
  default-language: Haskell2010
  ghc-options:
    -Weverything
    -Wno-all-missed-specialisations
    -Wno-implicit-prelude
    -Wno-missed-specialisations
    -Wno-missing-import-lists
    -Wno-missing-local-signatures
    -Wno-missing-safe-haskell-mode
    -Wno-monomorphism-restriction
    -Wno-name-shadowing
    -Wno-safe
    -Wno-unsafe
  if (impl(ghc >= 8.8))
    ghc-options: -Wno-missing-deriving-strategies
  if (impl(ghc >= 8.10))
    ghc-options:
      -Wno-missing-safe-haskell-mode
      -Wno-prepositive-qualified-module
  if (impl(ghc >= 9.2))
    ghc-options:
      -Wno-missing-kind-signatures

library
  import: common
  exposed-modules:
    Fresnel.At
    Fresnel.Bifunctor.Contravariant
    Fresnel.Either
    Fresnel.Fold
    Fresnel.Functor.Backwards
    Fresnel.Functor.Traversed
    Fresnel.Getter
    Fresnel.Iso
    Fresnel.Ixed
    Fresnel.Lens
    Fresnel.List
    Fresnel.List.NonEmpty
    Fresnel.Maybe
    Fresnel.Monoid.Cons
    Fresnel.Monoid.Fork
    Fresnel.Monoid.Snoc
    Fresnel.Optic
    Fresnel.Optional
    Fresnel.OptionalFold
    Fresnel.Prism
    Fresnel.Profunctor.Coexp
    Fresnel.Profunctor.OptionalStar
    Fresnel.Profunctor.Recall
    Fresnel.Review
    Fresnel.Set
    Fresnel.Setter
    Fresnel.Traversal
    Fresnel.Tuple
  other-modules:
    Fresnel.Getter.Internal
    Fresnel.Iso.Internal
    Fresnel.Lens.Internal
    Fresnel.Optional.Internal
    Fresnel.OptionalFold.Internal
    Fresnel.Prism.Internal
    Fresnel.Traversal.Internal
  build-depends:
    , base >=4.14 && < 5
    , containers   >= 0.5 && < 0.7
    , hashable     >= 1.3 && < 1.5
    , profunctors ^>= 5.6
    , transformers  >= 0.4 && < 0.6
    , unordered-containers ^>= 0.2
  hs-source-dirs: src

test-suite test
  import: common
  type: exitcode-stdio-1.0
  hs-source-dirs: test
  main-is: Test.hs
  other-modules:
    Fold.Test
    Fresnel.Tropical
    Getter.Test
    Iso.Test
    Monoid.Fork.Test
    Profunctor.Coexp.Test
    Review.Test
    Test.Group
    Test.Options
    Test.Print
    Test.Run
    Tropical.Test
  build-depends:
    , ansi-terminal ^>= 0.11
    , base
    , containers
    , fresnel
    , fused-effects ^>= 1.1
    , template-haskell >= 2.16 && < 2.22
    , QuickCheck ^>= 2.14
  if (impl(ghc >= 9.2))
    ghc-options:
      -Wno-missing-signatures


source-repository head
  type:     git
  location: https://github.com/fresnel/fresnel
  subdir:   fresnel