packages feed

linear-base-0.2.0: linear-base.cabal

cabal-version:      3.0
name:               linear-base
version:            0.2.0
license:            MIT
license-file:       LICENSE
copyright:          (c) Tweag Holding and affiliates
maintainer:         arnaud.spiwack@tweag.io
author:             Tweag
homepage:           https://github.com/tweag/linear-base#README
synopsis:           Standard library for linear types.
description:        Please see README.md.
category:           Prelude
build-type:         Simple
extra-source-files:
    README.md
    CHANGELOG.md
    docs/DESIGN.md
    docs/USER_GUIDE.md

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

common warnings
    ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wnoncanonical-monad-instances
                 -- Additional warnings we may consider adding:
                 -- * -Wredundant-constraints : would need deactivating in the modules which use Nat

library
    import: warnings
    exposed-modules:
        Control.Monad.IO.Class.Linear
        Control.Functor.Linear
        Control.Functor.Linear.Internal.Class
        Control.Functor.Linear.Internal.Instances
        Control.Functor.Linear.Internal.Kan
        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.Arity.Linear
        Data.Arity.Linear.Internal
        Data.Array.Destination
        Data.Array.Destination.Internal
        Data.Array.Mutable.Linear
        Data.Array.Mutable.Linear.Internal
        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.HashMap.Mutable.Linear.Internal
        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.Set.Mutable.Linear.Internal
        Data.Tuple.Linear
        Data.Unrestricted.Linear
        Data.Unrestricted.Linear.Internal.Consumable
        Data.Unrestricted.Linear.Internal.Dupable
        Data.Unrestricted.Linear.Internal.Movable
        Data.Unrestricted.Linear.Internal.Instances
        Data.Unrestricted.Linear.Internal.Ur
        Data.Unrestricted.Linear.Internal.UrT
        Data.Replicator.Linear
        Data.Replicator.Linear.Internal
        Data.Replicator.Linear.Internal.ReplicationStream
        Data.Replicator.Linear.Internal.Instances
        Data.V.Linear
        Data.V.Linear.Internal
        Data.V.Linear.Internal.Instances
        Data.Vector.Mutable.Linear
        Data.Vector.Mutable.Linear.Internal
        Debug.Trace.Linear
        Foreign.Marshal.Pure
        Foreign.Marshal.Pure.Internal
        Prelude.Linear
        Prelude.Linear.Generically
        Prelude.Linear.GenericUtil
        Prelude.Linear.Internal
        Prelude.Linear.Unsatisfiable
        Streaming.Linear
        Streaming.Linear.Internal.Consume
        Streaming.Linear.Internal.Interop
        Streaming.Linear.Internal.Many
        Streaming.Linear.Internal.Process
        Streaming.Linear.Internal.Produce
        Streaming.Linear.Internal.Type
        Streaming.Prelude.Linear
        System.IO.Linear
        System.IO.Resource.Linear
        System.IO.Resource.Linear.Internal
        Unsafe.Linear

    hs-source-dirs:   src
    default-language: Haskell2010
    build-depends:

        base >=4.15 && <5,
        containers,
        ghc-prim,
        hashable,
        linear-generics >= 0.2,
        storable-tuple,
        text,
        transformers,
        vector >=0.12.2,
        primitive

test-suite test
    import: warnings
    type:             exitcode-stdio-1.0
    main-is:          Main.hs
    hs-source-dirs:   test
    other-modules:
        Test.Data.Destination
        Test.Data.Mutable.Array
        Test.Data.Mutable.Vector
        Test.Data.Mutable.HashMap
        Test.Data.Mutable.Set
        Test.Data.Polarized
        Test.Data.V
        Test.Data.Replicator

    default-language: Haskell2010
    ghc-options:      -threaded -rtsopts -with-rtsopts=-N
    build-depends:
        inspection-testing,
        tasty-inspection-testing,
        base,
        linear-base,
        containers,
        hedgehog,
        tasty,
        tasty-hedgehog,
        mmorph,
        vector

test-suite examples
    import: warnings
    type:             exitcode-stdio-1.0
    main-is:          Main.hs
    hs-source-dirs:   examples
    other-modules:
        Test.Foreign
        Test.Quicksort
        Test.Generic
        Foreign.List
        Foreign.Heap
        Simple.FileIO
        Simple.Pure
        Simple.Quicksort
        Simple.TopSort
        Generic.Traverse

    default-language: Haskell2010
    ghc-options:      -threaded -rtsopts -with-rtsopts=-N
    build-depends:
        base,
        linear-base,
        tasty,
        tasty-hedgehog,
        hedgehog,
        storable-tuple,
        vector,
        text,
        linear-generics

benchmark mutable-data
    import: warnings
    type:             exitcode-stdio-1.0
    main-is:          Main.hs
    hs-source-dirs:   bench
    other-modules:
        Data.Mutable.HashMap
        Data.Mutable.Array

    default-language: Haskell2010
    build-depends:
        base,
        vector,
        deepseq,
        gauge,
        hashtables,
        hashable,
        linear-base,
        random,
        random-shuffle,
        unordered-containers,
        MonadRandom