packages feed

linear-base-0.1.0: linear-base.cabal

name: linear-base
version: 0.1.0
cabal-version: >=1.10
homepage: https://github.com/tweag/linear-base#README
license: MIT
license-file: LICENSE
author: Tweag
maintainer: arnaud.spiwack@tweag.io
copyright: (c) Tweag Holding and affiliates
category: Prelude
build-type: Simple
synopsis: Standard library for linear types.
description: Please see README.md.

extra-source-files:
  README.md
  CHANGELOG.md
  docs/DESIGN.md
  docs/USER_GUIDE.md

library
  hs-source-dirs: src
  exposed-modules:
    Control.Monad.IO.Class.Linear
    Control.Functor.Linear
    Control.Functor.Linear.Internal.Class
    Control.Functor.Linear.Internal.Instances
    Control.Functor.Linear.Internal.MonadTrans
    Control.Functor.Linear.Internal.Reader
    Control.Functor.Linear.Internal.State
    Control.Optics.Linear
    Control.Optics.Linear.Internal
    Control.Optics.Linear.Iso
    Control.Optics.Linear.Lens
    Control.Optics.Linear.Prism
    Control.Optics.Linear.Traversal
    Data.Array.Destination
    Data.Array.Mutable.Linear
    Data.Array.Mutable.Unlifted.Linear
    Data.Array.Polarized
    Data.Array.Polarized.Pull
    Data.Array.Polarized.Pull.Internal
    Data.Array.Polarized.Push
    Data.Bifunctor.Linear
    Data.Bifunctor.Linear.Internal.Bifunctor
    Data.Bifunctor.Linear.Internal.SymmetricMonoidal
    Data.Bool.Linear
    Data.Either.Linear
    Data.Functor.Linear
    Data.Functor.Linear.Internal.Functor
    Data.Functor.Linear.Internal.Applicative
    Data.Functor.Linear.Internal.Traversable
    Data.HashMap.Mutable.Linear
    Data.List.Linear
    Data.Maybe.Linear
    Data.Monoid.Linear
    Data.Monoid.Linear.Internal.Monoid
    Data.Monoid.Linear.Internal.Semigroup
    Data.Num.Linear
    Data.Ord.Linear
    Data.Ord.Linear.Internal.Ord
    Data.Ord.Linear.Internal.Eq
    Data.Profunctor.Kleisli.Linear
    Data.Profunctor.Linear
    Data.Set.Mutable.Linear
    Data.Tuple.Linear
    Data.Unrestricted.Internal.Consumable
    Data.Unrestricted.Internal.Dupable
    Data.Unrestricted.Internal.Movable
    Data.Unrestricted.Internal.Instances
    Data.Unrestricted.Internal.Ur
    Data.Unrestricted.Linear
    Data.V.Linear
    Data.V.Linear.Internal.V
    Data.V.Linear.Internal.Instances
    Data.Vector.Mutable.Linear
    Debug.Trace.Linear
    Foreign.Marshal.Pure
    Prelude.Linear
    Prelude.Linear.Internal
    Streaming.Linear
    Streaming.Prelude.Linear
    Streaming.Internal.Consume
    Streaming.Internal.Interop
    Streaming.Internal.Many
    Streaming.Internal.Process
    Streaming.Internal.Produce
    Streaming.Internal.Type
    System.IO.Linear
    System.IO.Resource
    Unsafe.Linear
  build-depends:
    base >= 4.15 && < 5,
    containers,
    ghc-prim,
    hashable,
    storable-tuple,
    text,
    transformers,
    vector,
    primitive
  default-language: Haskell2010

test-suite test
  type: exitcode-stdio-1.0
  hs-source-dirs: test
  main-is: Main.hs
  other-modules:
    Test.Data.Destination
    Test.Data.Mutable.Array
    Test.Data.Mutable.Vector
    Test.Data.Mutable.HashMap
    Test.Data.Mutable.Set
    Test.Data.Polarized
  build-depends:
    base,
    linear-base,
    containers,
    hedgehog,
    tasty,
    tasty-hedgehog,
    mmorph,
    vector
  ghc-options: -threaded -rtsopts -with-rtsopts=-N
  default-language: Haskell2010

test-suite examples
  type: exitcode-stdio-1.0
  hs-source-dirs: examples
  main-is: Main.hs
  other-modules:
    Test.Foreign
    Test.Quicksort
    Foreign.List
    Foreign.Heap
    Simple.FileIO
    Simple.Pure
    Simple.Quicksort
    Simple.TopSort
  build-depends:
    base,
    linear-base,
    tasty,
    tasty-hedgehog,
    hedgehog,
    storable-tuple,
    vector,
    text
  ghc-options: -threaded -rtsopts -with-rtsopts=-N
  default-language: Haskell2010

benchmark mutable-data
  type: exitcode-stdio-1.0
  hs-source-dirs: bench
  main-is: Main.hs
  other-modules:
    Data.Mutable.HashMap
  build-depends:
    base,
    deepseq,
    gauge,
    hashtables,
    hashable,
    linear-base,
    random,
    random-shuffle,
    unordered-containers
  ghc-options: -rtsopts=ignore
  default-language: Haskell2010

-- TODO: Uncomment below block and set 'build-type' to 'Custom' to enable
-- doctests once cabal-install 3.4 is released.
--
-- Longer story:
--
-- cabal-install has a piece of code[1] which injects a Cabal upper bound to
-- packages with custom Setup.hs's. And this happens after the overrides,
-- so the usual mechanisms of overriding upper bounds does not work.
--
-- GHC 9 comes with Cabal 3.4, which is above that bound. So, when using
-- GHC 9 with cabal-install 3.2; `build-type: Custom` causes another Cabal
-- library to be built, and that causes a strange type error ("expecting IO,
-- but got IO"), which I suspect because it conflicts with the existing boot
-- packages.
--
-- [1]: https://github.com/haskell/cabal/blob/d28c80acc69b9e7fa992a0b2b7fced937734b238/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1132-L1149

-- custom-setup
--  setup-depends:
--    base >= 4 && <5,
--    Cabal,
--    cabal-doctest
--
-- test-suite doctests
--   type:                 exitcode-stdio-1.0
--   hs-source-dirs:       test/
--   main-is:              Doctest.hs
--   build-depends:        base
--                       , doctest
--                       , linear-base
--   ghc-options:          -Wall -threaded
--   default-language:     Haskell2010

source-repository head
  type: git
  location: https://github.com/tweag/linear-base