packages feed

reflex-0.10.0.0: reflex.cabal

cabal-version:      1.22
name:               reflex
version:            0.10.0.0
license:            BSD3
license-file:       LICENSE
maintainer:         ryan.trinkle@gmail.com
author:             Ryan Trinkle
stability:          Experimental
tested-with:
    ghc ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.7 || ==9.8.4 || ==9.10.3 || ==9.12.4 || ==9.14.1

homepage:           https://reflex-frp.org
bug-reports:        https://github.com/reflex-frp/reflex/issues
synopsis:           Higher-order Functional Reactive Programming
description:
    Interactive programs without callbacks or side-effects.
    Functional Reactive Programming (FRP) uses composable events and time-varying
    values to describe interactive systems as pure functions.
    Just like other pure functional code, functional reactive code is easier
    to get right on the first try, maintain, and reuse.
    .
    Reflex is a fully-deterministic, higher-order Functional Reactive Programming
    interface and an engine that efficiently implements that interface.
    .
    <https://reflex-frp.org>

category:           FRP
build-type:         Simple
extra-source-files:
    README.md
    Quickref.md
    ChangeLog.md

source-repository head
    type:     git
    location: https://github.com/reflex-frp/reflex

flag debug-trace-events
    description:
        Add instrumentation that outputs the stack trace of the definition of an event whenever it is subscribed to. Warning: It is very slow!

    default:     False
    manual:      True

flag debug-propagation
    description: Enable debugging of spider internals
    default:     False
    manual:      True

flag debug-cycles
    description: Enable debugging of event cycles
    default:     False
    manual:      True

flag debug-frame
    description: Check frame hygiene
    default:     False
    manual:      True

flag split-these
    description: Use split these/semialign packages
    manual:      False
    default:     True

library
    exposed-modules:
        Control.Monad.ReaderIO
        Data.AppendMap
        Data.FastMutableIntMap
        Data.Map.Misc
        Data.WeakBag
        Reflex
        Reflex.Class
        Reflex.Adjustable.Class
        Reflex.BehaviorWriter.Base
        Reflex.BehaviorWriter.Class
        Reflex.Collection
        Reflex.Dynamic
        Reflex.Dynamic.TH
        Reflex.Dynamic.Uniq
        Reflex.DynamicWriter
        Reflex.DynamicWriter.Base
        Reflex.DynamicWriter.Class
        Reflex.EventWriter
        Reflex.EventWriter.Base
        Reflex.EventWriter.Class
        Reflex.FunctorMaybe
        Reflex.Host.Class
        Reflex.Host.Headless
        Reflex.Network
        Reflex.NotReady.Class
        Reflex.PerformEvent.Base
        Reflex.PerformEvent.Class
        Reflex.PostBuild.Base
        Reflex.PostBuild.Class
        Reflex.Profiled
        Reflex.Pure
        Reflex.Query.Base
        Reflex.Query.Class
        Reflex.Requester.Base
        Reflex.Requester.Base.Internal
        Reflex.Requester.Class
        Reflex.Spider
        Reflex.Spider.Height
        Reflex.Spider.Internal
        Reflex.Time
        Reflex.TriggerEvent.Base
        Reflex.TriggerEvent.Class
        Reflex.Widget.Basic
        Reflex.Workflow

    reexported-modules:
        patch:Data.Functor.Misc
      , patch:Data.Patch as Reflex.Patch
      , patch:Data.Patch.Class as Reflex.Patch.Class
      , patch:Data.Patch.DMap as Reflex.Patch.DMap
      , patch:Data.Patch.DMapWithMove as Reflex.Patch.DMapWithMove
      , patch:Data.Patch.IntMap as Reflex.Patch.IntMap
      , patch:Data.Patch.Map as Reflex.Patch.Map
      , patch:Data.Patch.MapWithMove as Reflex.Patch.MapWithMove

    hs-source-dirs:     src
    default-language:   Haskell2010
    ghc-options:
        -Wall -fwarn-redundant-constraints -fwarn-tabs
        -funbox-strict-fields -O2 -fspecialise-aggressively

    build-depends:
        MemoTrie == 0.6.*
      , base >= 4.11 && < 4.23
      , commutative-semigroups >= 0.1 && <0.3
      , constraints >= 0.10 && <0.15
      , containers >= 0.6 && < 0.9
      , data-default >= 0.5 && < 0.9
      , dependent-map >= 0.3 && < 0.5
      , dependent-sum >= 0.6 && < 0.8
      , exceptions >= 0.10 && < 0.11
      , exception-transformers >= 0.4 && < 0.5
      , mmorph >= 1.0 && < 1.3
      , monad-control >= 1.0.1 && < 1.1
      , mtl >= 2.1 && < 2.4
      , patch >= 0.0.7 && < 0.1
      , prim-uniq >= 0.1.0.1 && < 0.3
      , primitive >= 0.5 && < 0.10
      , profunctors >= 5.3 && < 5.7
      , random >= 1.1 && < 1.4
      , ref-tf >= 0.4 && < 0.6
      , reflection == 2.1.*
      , semigroupoids >= 4.0 && < 7
      , syb >= 0.5 && < 0.8
      , time >= 1.4 && < 1.16
      , transformers >= 0.5 && < 0.7
      , unbounded-delays >= 0.1.0.0 && < 0.2
      , witherable >= 0.4 && < 0.6
      , haskell-src-exts >= 1.16 && < 1.24
      , haskell-src-meta >= 0.6 && < 0.9
      , template-haskell >= 2.9 && < 2.25

    other-extensions:
      TemplateHaskell

    if flag(split-these)
        build-depends:
            these >=1 && <1.3
          , semialign >=1 && <1.4
          , monoidal-containers >=0.6.2.0 && <0.7

    else
        build-depends:
            these >=0.4 && <0.9
          , monoidal-containers ==0.4.0.0

    if flag(debug-trace-events)
        cpp-options:   -DDEBUG_TRACE_EVENTS
        build-depends: bytestring >=0.10.8 && <0.13

    if flag(debug-propagation)
        cpp-options:
            -DDEBUG -DDEBUG_TRACE_PROPAGATION -DDEBUG_TRACE_INVALIDATION

    if flag(debug-cycles)
        cpp-options: -DDEBUG_CYCLES

    if flag(debug-frame)
        cpp-options: -DDEBUG_FRAME

    if impl(ghcjs)
        build-depends: ghcjs-base >=0.2 && <0.3

    if impl(ghc >= 9.12)
        ghc-options: -fexpose-overloaded-unfoldings

test-suite semantics
    type:             exitcode-stdio-1.0
    main-is:          semantics.hs
    hs-source-dirs:   test
    other-modules:
        Reflex.Bench.Focused
        Reflex.Plan.Pure
        Reflex.Plan.Reflex
        Reflex.Test
        Reflex.Test.Micro
        Reflex.TestPlan

    default-language: Haskell2010
    ghc-options:      -O2 -Wall -rtsopts
    build-depends:
        base >= 4.11 && < 4.23
      , containers
      , deepseq
      , dependent-map
      , dependent-sum
      , mtl
      , ref-tf
      , reflex
      , split
      , tasty
      , tasty-expected-failure
      , tasty-hunit
      , transformers

test-suite CrossImpl
    type:             exitcode-stdio-1.0
    main-is:          Reflex/Test/CrossImpl.hs
    hs-source-dirs:   test

    default-language: Haskell2010
    ghc-options:      -O2 -Wall -rtsopts
    build-depends:
        base >= 4.11 && < 4.23
      , containers
      , dependent-sum
      , mtl
      , ref-tf
      , reflex

test-suite EventWriterT
    type:             exitcode-stdio-1.0
    main-is:          EventWriterT.hs
    hs-source-dirs:   test
    other-modules:    Test.Run
    default-language: Haskell2010
    build-depends:
        base >= 4.11 && < 4.23
      , containers
      , dependent-map
      , dependent-sum
      , lens
      , these
      , reflex
      , ref-tf

    if flag(split-these)
        build-depends: these-lens

test-suite DebugCycles
    type:             exitcode-stdio-1.0
    main-is:          DebugCycles.hs
    hs-source-dirs:   test
    other-modules:    Test.Run
    default-language: Haskell2010
    ghc-options:      -threaded
    build-depends:
        base >= 4.11 && < 4.23
      , containers
      , dependent-sum
      , hspec
      , lens
      , these
      , reflex
      , ref-tf
      , witherable

    if flag(split-these)
        build-depends:
            these-lens
          , semialign

test-suite RequesterT
    type:             exitcode-stdio-1.0
    main-is:          RequesterT.hs
    hs-source-dirs:   test
    other-modules:
        Reflex.TestPlan
        Reflex.Plan.Pure
        Test.Run

    default-language: Haskell2010
    build-depends:
        base >= 4.11 && < 4.23
      , constraints
      , constraints-extras
      , containers
      , deepseq
      , dependent-map
      , dependent-sum
      , lens
      , mtl
      , ref-tf
      , reflex
      , text
      , these

    if flag(split-these)
        build-depends: these-lens

test-suite Headless
    type:             exitcode-stdio-1.0
    main-is:          Headless.hs
    hs-source-dirs:   test
    default-language: Haskell2010
    build-depends:
        base >= 4.11 && < 4.23
      , reflex

test-suite Adjustable
    type:             exitcode-stdio-1.0
    main-is:          Adjustable.hs
    hs-source-dirs:   test
    other-modules:    Test.Run
    default-language: Haskell2010
    build-depends:
        base >= 4.11 && < 4.23
      , containers
      , dependent-sum
      , reflex
      , ref-tf
      , these

test-suite QueryT
    type:             exitcode-stdio-1.0
    main-is:          QueryT.hs
    hs-source-dirs:   test
    other-modules:
        Test.Run
        Reflex.TestPlan
        Reflex.Plan.Reflex
        Reflex.Plan.Pure

    default-language: Haskell2010
    build-depends:
        base >= 4.11 && < 4.23
      , commutative-semigroups
      , containers
      , dependent-sum
      , deepseq
      , lens
      , monoidal-containers
      , mtl
      , patch
      , ref-tf
      , reflex
      , these

    if flag(split-these)
        build-depends:
            semialign
          , these-lens

test-suite GC-Semantics
    type:             exitcode-stdio-1.0
    main-is:          GC.hs
    hs-source-dirs:   test
    other-modules:
        Reflex.Plan.Pure
        Reflex.Plan.Reflex
        Reflex.TestPlan
        Test.Run

    default-language: Haskell2010
    build-depends:
        base >= 4.11 && < 4.23
      , containers
      , dependent-sum
      , dependent-map
      , deepseq
      , mtl
      , patch
      , these
      , reflex
      , ref-tf

    if flag(split-these)
        build-depends: semialign

test-suite rootCleanup
    type:             exitcode-stdio-1.0
    main-is:          rootCleanup.hs
    hs-source-dirs:   test
    other-modules:
        Reflex.Plan.Pure
        Reflex.TestPlan
        Test.Run

    default-language: Haskell2010
    build-depends:
        base >= 4.11 && < 4.23
      , containers
      , deepseq
      , dependent-sum
      , mtl
      , reflex
      , ref-tf
      , these

test-suite runHostFrame
    type:             exitcode-stdio-1.0
    main-is:          runHostFrame.hs
    hs-source-dirs:   test
    default-language: Haskell2010
    ghc-options:      -Wall
    build-depends:
        base >= 4.11 && < 4.23
      , containers
      , reflex
      , tasty
      , tasty-expected-failure
      , tasty-hunit

test-suite newFanEventWithTrigger
    type:             exitcode-stdio-1.0
    main-is:          newFanEventWithTrigger.hs
    hs-source-dirs:   test
    default-language: Haskell2010
    ghc-options:      -Wall
    build-depends:
        base >= 4.11 && < 4.23
      , containers
      , dependent-sum
      , reflex
      , tasty
      , tasty-hunit

test-suite behaviorLeak
    type:             exitcode-stdio-1.0
    main-is:          behaviorLeak.hs
    hs-source-dirs:   test
    default-language: Haskell2010
    ghc-options:      -Wall -O2 -rtsopts "-with-rtsopts=-T"
    build-depends:
        base >= 4.11 && < 4.23
      , dependent-sum
      , reflex
      , ref-tf
      , primitive

test-suite collectedSubscriber
    type:             exitcode-stdio-1.0
    main-is:          collectedSubscriber.hs
    hs-source-dirs:   test
    default-language: Haskell2010
    ghc-options:      -Wall -O2 -rtsopts
    build-depends:
        base >= 4.11 && < 4.23
      , containers
      , dependent-sum
      , reflex
      , tasty
      , tasty-hunit
    other-modules:

benchmark spider-bench
    type:             exitcode-stdio-1.0
    main-is:          Main.hs
    hs-source-dirs:   bench test
    other-modules:
        Reflex.TestPlan
        Reflex.Plan.Reflex
        Reflex.Bench.Focused

    default-language: Haskell2010
    ghc-options:      -Wall -O2 -rtsopts
    build-depends:
        base >= 4.11 && < 4.23
      , containers
      , criterion
      , deepseq
      , dependent-map
      , dependent-sum
      , ref-tf
      , mtl
      , reflex
      , split
      , stm
      , transformers

    if arch(javascript)
        buildable: False

benchmark saulzar-bench
    type:             exitcode-stdio-1.0
    main-is:          RunAll.hs
    c-sources:        bench-cbits/checkCapability.c
    hs-source-dirs:   bench test
    other-modules:
        Reflex.TestPlan
        Reflex.Plan.Reflex
        Reflex.Bench.Focused

    default-language: Haskell2010
    ghc-options:      -Wall -O2 -rtsopts -threaded
    build-depends:
        base >= 4.11 && < 4.23
      , containers
      , criterion
      , deepseq
      , dependent-map
      , dependent-sum
      , loch-th
      , mtl
      , process
      , ref-tf
      , reflex
      , split
      , stm
      , time
      , transformers

    if arch(javascript)
        buildable: False