reflex 0.9.3.4 → 0.9.4.0
raw patch · 44 files changed
+647/−675 lines, 44 filesdep −ghcdep ~basedep ~lens
Dependencies removed: ghc
Dependency ranges changed: base, lens
Files
- ChangeLog.md +9/−0
- reflex.cabal +447/−440
- src/Control/Monad/ReaderIO.hs +5/−5
- src/Data/AppendMap.hs +1/−1
- src/Data/FastMutableIntMap.hs +1/−0
- src/Data/FastWeakBag.hs +1/−3
- src/Data/Map/Misc.hs +1/−0
- src/Data/WeakBag.hs +1/−3
- src/Reflex.hs +1/−2
- src/Reflex/Adjustable/Class.hs +1/−3
- src/Reflex/BehaviorWriter/Base.hs +5/−3
- src/Reflex/BehaviorWriter/Class.hs +1/−3
- src/Reflex/Class.hs +0/−3
- src/Reflex/Collection.hs +5/−3
- src/Reflex/Dynamic.hs +10/−7
- src/Reflex/Dynamic/TH.hs +7/−5
- src/Reflex/Dynamic/Uniq.hs +6/−3
- src/Reflex/DynamicWriter/Base.hs +6/−3
- src/Reflex/DynamicWriter/Class.hs +1/−3
- src/Reflex/EventWriter/Base.hs +1/−3
- src/Reflex/EventWriter/Class.hs +5/−3
- src/Reflex/Host/Class.hs +1/−3
- src/Reflex/Host/Headless.hs +1/−0
- src/Reflex/Network.hs +1/−3
- src/Reflex/NotReady/Class.hs +1/−3
- src/Reflex/Optimizer.hs +0/−63
- src/Reflex/PerformEvent/Base.hs +8/−6
- src/Reflex/PerformEvent/Class.hs +5/−4
- src/Reflex/PostBuild/Base.hs +13/−11
- src/Reflex/PostBuild/Class.hs +1/−3
- src/Reflex/Profiled.hs +8/−2
- src/Reflex/Pure.hs +1/−5
- src/Reflex/Query/Base.hs +6/−1
- src/Reflex/Query/Class.hs +6/−1
- src/Reflex/Requester/Base/Internal.hs +16/−14
- src/Reflex/Requester/Class.hs +3/−3
- src/Reflex/Spider.hs +12/−11
- src/Reflex/Spider/Internal.hs +22/−21
- src/Reflex/Time.hs +15/−18
- src/Reflex/TriggerEvent/Base.hs +8/−1
- src/Reflex/TriggerEvent/Class.hs +1/−0
- src/Reflex/Widget/Basic.hs +0/−3
- src/Reflex/Workflow.hs +3/−2
- test/hlint.hs +0/−1
ChangeLog.md view
@@ -1,5 +1,14 @@ # Revision history for reflex +## 0.9.4.0++* Add note about `requesting` semantics by @LightAndLight in https://github.com/reflex-frp/reflex/pull/508+* Dropped lens by @ilyakooo0 in https://github.com/reflex-frp/reflex/pull/463+* Build with ghc(js) 9.8.2 + 9.10.1 + 9.12.2 by @ymeister in https://github.com/reflex-frp/reflex/pull/502+* headless: Add MonadThrow (Performable m) by @ali-abrar in https://github.com/reflex-frp/reflex/pull/523+* Don't check in newSubscriberCoincidenceInner whether occRef is already set by @parenthetical in https://github.com/reflex-frp/reflex/pull/496+* Always enable Template Haskell by @Ericson2314 in https://github.com/reflex-frp/reflex/pull/484+ ## 0.9.3.4 * Support random 1.3
reflex.cabal view
@@ -1,503 +1,510 @@-Name: reflex-Version: 0.9.3.4-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>-License: BSD3-License-file: LICENSE-Author: Ryan Trinkle-Maintainer: ryan.trinkle@gmail.com-Stability: Experimental-Category: FRP-Build-type: Simple-Cabal-version: 1.22-homepage: https://reflex-frp.org-bug-reports: https://github.com/reflex-frp/reflex/issues-extra-source-files:- README.md- Quickref.md- ChangeLog.md-+cabal-version: 1.22+name: reflex+version: 0.9.4.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.1 || ==8.10.7 || ==9.0.1 || ==9.2.5 || ==9.4.5 || ==9.6.1 || ==9.8.2 || ==9.10.1 || ==9.12.1,- GHCJS ==8.6 || ==8.10+ ghc ==8.4.4 || ==8.6.5 || ==8.8.1 || ==8.10.7 || ==9.0.1 || ==9.2.5 || ==9.4.5 || ==9.6.1 || ==9.8.2 || ==9.10.1 || ==9.12.2 -flag use-reflex-optimizer- description: Use the GHC plugin Reflex.Optimizer on some of the modules in the package. This is still experimental.- default: False- manual: True+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> -flag use-template-haskell- description: Use template haskell to generate lenses- default: True- manual: True+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+ 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 fast-weak- description: Use the primitive implementation of FastWeak in GHCJS; note that this requires GHCJS to be built with FastWeak and FastWeakBag present in the RTS, which is not the default- default: False- manual: True+ description:+ Use the primitive implementation of FastWeak in GHCJS; note that this requires GHCJS to be built with FastWeak and FastWeakBag present in the RTS, which is not the default + default: False+ manual: True+ flag debug-propagation- description: Enable debugging of spider internals- default: False- manual: True+ description: Enable debugging of spider internals+ default: False+ manual: True flag debug-cycles- description: Enable debugging of event cycles- default: False- manual: True+ description: Enable debugging of event cycles+ default: False+ manual: True flag split-these- description: Use split these/semialign packages- manual: False- default: True+ description: Use split these/semialign packages+ manual: False+ default: True library- default-language: Haskell2010- hs-source-dirs: src- build-depends:- MemoTrie == 0.6.*,- base >= 4.11 && < 4.22,- bifunctors >= 5.2 && < 5.7,- comonad >= 5.0.4 && < 5.1,- commutative-semigroups >= 0.1 && <0.3,- constraints >= 0.10 && <0.15,- constraints-extras >= 0.3 && < 0.5,- containers >= 0.6 && < 0.8,- 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,- lens >= 4.7 && < 5.4,- 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,- stm >= 2.4 && < 2.6,- syb >= 0.5 && < 0.8,- time >= 1.4 && < 1.15,- transformers >= 0.5 && < 0.7,- unbounded-delays >= 0.1.0.0 && < 0.2,- witherable >= 0.4 && < 0.6+ exposed-modules:+ Control.Monad.ReaderIO+ Data.AppendMap+ Data.FastMutableIntMap+ Data.FastWeakBag+ 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.FastWeak+ 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.Internal+ Reflex.Time+ Reflex.TriggerEvent.Base+ Reflex.TriggerEvent.Class+ Reflex.Widget.Basic+ Reflex.Workflow - 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+ 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 - exposed-modules:- Control.Monad.ReaderIO- Data.AppendMap,- Data.FastMutableIntMap,- Data.FastWeakBag,- Data.Map.Misc,- Data.WeakBag,- Reflex,- Reflex.Class,- Reflex.Adjustable.Class,- Reflex.BehaviorWriter.Base,- Reflex.BehaviorWriter.Class,- Reflex.Collection,- Reflex.Dynamic,- Reflex.Dynamic.Uniq,- Reflex.DynamicWriter,- Reflex.DynamicWriter.Base,- Reflex.DynamicWriter.Class,- Reflex.EventWriter,- Reflex.EventWriter.Base,- Reflex.EventWriter.Class,- Reflex.FastWeak,- 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.Internal,- Reflex.Time,- Reflex.TriggerEvent.Base,- Reflex.TriggerEvent.Class,- Reflex.Widget.Basic,- Reflex.Workflow+ hs-source-dirs: src+ default-language: Haskell2010+ ghc-options:+ -Wall -fwarn-redundant-constraints -fwarn-tabs+ -funbox-strict-fields -O2 -fspecialise-aggressively - 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+ build-depends:+ MemoTrie == 0.6.*+ , base >= 4.11 && < 4.22+ , bifunctors >= 5.2 && < 5.7+ , comonad >= 5.0.4 && < 5.1+ , commutative-semigroups >= 0.1 && <0.3+ , constraints >= 0.10 && <0.15+ , constraints-extras >= 0.3 && < 0.5+ , containers >= 0.6 && < 0.8+ , 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+ , stm >= 2.4 && < 2.6+ , syb >= 0.5 && < 0.8+ , time >= 1.4 && < 1.15+ , 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.24 - ghc-options: -Wall -fwarn-redundant-constraints -fwarn-tabs -funbox-strict-fields -O2 -fspecialise-aggressively+ other-extensions:+ TemplateHaskell - if flag(debug-trace-events)- cpp-options: -DDEBUG_TRACE_EVENTS- build-depends:- bytestring >= 0.10.8 && < 0.11+ if flag(split-these)+ build-depends:+ these >=1 && <1.3+ , semialign >=1 && <1.4+ , monoidal-containers >=0.6.2.0 && <0.7 - if flag(use-reflex-optimizer)- cpp-options: -DUSE_REFLEX_OPTIMIZER- build-depends: ghc- exposed-modules: Reflex.Optimizer+ else+ build-depends:+ these >=0.4 && <0.9+ , monoidal-containers ==0.4.0.0 - if flag(debug-propagation)- cpp-options: -DDEBUG -DDEBUG_TRACE_PROPAGATION -DDEBUG_TRACE_INVALIDATION+ if flag(debug-trace-events)+ cpp-options: -DDEBUG_TRACE_EVENTS+ build-depends: bytestring >=0.10.8 && <0.11 - if flag(debug-cycles)- cpp-options: -DDEBUG_CYCLES+ if flag(debug-propagation)+ cpp-options:+ -DDEBUG -DDEBUG_TRACE_PROPAGATION -DDEBUG_TRACE_INVALIDATION - if flag(use-template-haskell)- cpp-options: -DUSE_TEMPLATE_HASKELL- build-depends:- haskell-src-exts >= 1.16 && < 1.24,- haskell-src-meta >= 0.6 && < 0.9,- template-haskell >= 2.9 && < 2.24- exposed-modules:- Reflex.Dynamic.TH- other-extensions: TemplateHaskell+ if flag(debug-cycles)+ cpp-options: -DDEBUG_CYCLES - if flag(fast-weak) && impl(ghcjs)- cpp-options: -DGHCJS_FAST_WEAK+ if flag(fast-weak) && impl(ghcjs >=0)+ cpp-options: -DGHCJS_FAST_WEAK - if impl(ghcjs)- build-depends:- ghcjs-base == 0.2.*+ if impl(ghcjs)+ build-depends: ghcjs-base >=0.2 && <0.3 test-suite semantics- default-language: Haskell2010- type: exitcode-stdio-1.0- main-is: semantics.hs- hs-source-dirs: test- ghc-options: -O2 -Wall -rtsopts- build-depends:- base,- bifunctors,- containers,- deepseq,- dependent-map,- dependent-sum,- mtl,- ref-tf,- reflex,- split,- transformers- other-modules:- Reflex.Bench.Focused- Reflex.Plan.Pure- Reflex.Plan.Reflex- Reflex.Test- Reflex.Test.Micro- Reflex.TestPlan+ 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.22+ , bifunctors+ , containers+ , deepseq+ , dependent-map+ , dependent-sum+ , mtl+ , ref-tf+ , reflex+ , split+ , transformers+ test-suite CrossImpl- default-language: Haskell2010- type: exitcode-stdio-1.0- main-is: Reflex/Test/CrossImpl.hs- hs-source-dirs: test- ghc-options: -O2 -Wall -rtsopts- build-depends:- base,- containers,- dependent-map,- dependent-sum,- deepseq,- mtl,- transformers,- ref-tf,- reflex- other-modules:- Reflex.Test- Reflex.TestPlan- Reflex.Plan.Reflex- Reflex.Plan.Pure+ type: exitcode-stdio-1.0+ main-is: Reflex/Test/CrossImpl.hs+ hs-source-dirs: test+ other-modules:+ Reflex.Test+ Reflex.TestPlan+ Reflex.Plan.Reflex+ Reflex.Plan.Pure -test-suite hlint- default-language: Haskell2010- type: exitcode-stdio-1.0- main-is: hlint.hs- hs-source-dirs: test- build-depends: base- , directory- , filepath- , filemanip- , reflex- if impl(ghc >= 9.6)- buildable: False- if impl(ghc < 9.2)- build-depends: hlint (< 2.1 || >= 2.2.2) && < 3.5- else- build-depends: hlint >= 3.5 && < 3.6- if impl(ghcjs)- buildable: False+ default-language: Haskell2010+ ghc-options: -O2 -Wall -rtsopts+ build-depends:+ base >= 4.11 && < 4.22+ , containers+ , dependent-map+ , dependent-sum+ , deepseq+ , mtl+ , transformers+ , ref-tf+ , reflex -test-suite EventWriterT- default-language: Haskell2010- type: exitcode-stdio-1.0- main-is: EventWriterT.hs- hs-source-dirs: test- build-depends: base- , containers- , deepseq- , dependent-map- , dependent-sum- , lens- , mtl- , these- , transformers- , reflex- , ref-tf+test-suite hlint+ type: exitcode-stdio-1.0+ main-is: hlint.hs+ hs-source-dirs: test+ default-language: Haskell2010+ build-depends:+ base >= 4.11 && < 4.22+ , directory+ , filepath+ , filemanip - if flag(split-these)- build-depends: these-lens+ if impl(ghc >=9.6)+ buildable: False - other-modules:- Test.Run+ if impl(ghc <9.2)+ build-depends: hlint (<2.1 || >=2.2.2) && <3.5 + else+ build-depends: hlint >=3.5 && <3.6 -test-suite DebugCycles- default-language: Haskell2010- type: exitcode-stdio-1.0- main-is: DebugCycles.hs- hs-source-dirs: test- ghc-options: -threaded- build-depends: base- , containers- , deepseq- , dependent-map- , dependent-sum- , hspec- , lens- , mtl- , these- , transformers- , reflex- , ref-tf- , witherable+ if impl(ghcjs >=0) || arch(javascript)+ buildable: False +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.22+ , containers+ , deepseq+ , dependent-map+ , dependent-sum+ , lens+ , mtl+ , these+ , transformers+ , reflex+ , ref-tf - if flag(split-these)- build-depends: these-lens, semialign+ if flag(split-these)+ build-depends: these-lens - other-modules:- Test.Run+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.22+ , containers+ , deepseq+ , dependent-map+ , dependent-sum+ , hspec+ , lens+ , mtl+ , these+ , transformers+ , reflex+ , ref-tf+ , witherable + if flag(split-these)+ build-depends:+ these-lens+ , semialign test-suite RequesterT- default-language: Haskell2010- type: exitcode-stdio-1.0- main-is: RequesterT.hs- hs-source-dirs: test- build-depends: base- , constraints- , constraints-extras- , containers- , deepseq- , dependent-map- , dependent-sum- , lens- , mtl- , ref-tf- , reflex- , text- , these- , transformers+ type: exitcode-stdio-1.0+ main-is: RequesterT.hs+ hs-source-dirs: test+ other-modules:+ Reflex.TestPlan+ Reflex.Plan.Pure+ Test.Run - if flag(split-these)- build-depends: these-lens+ default-language: Haskell2010+ build-depends:+ base >= 4.11 && < 4.22+ , constraints+ , constraints-extras+ , containers+ , deepseq+ , dependent-map+ , dependent-sum+ , lens+ , mtl+ , ref-tf+ , reflex+ , text+ , these+ , transformers - other-modules:- Reflex.TestPlan- Reflex.Plan.Pure- Test.Run+ if flag(split-these)+ build-depends: these-lens test-suite Headless- default-language: Haskell2010- type: exitcode-stdio-1.0- main-is: Headless.hs- hs-source-dirs: test- build-depends: base- , reflex+ type: exitcode-stdio-1.0+ main-is: Headless.hs+ hs-source-dirs: test+ default-language: Haskell2010+ build-depends:+ base >= 4.11 && < 4.22+ , reflex test-suite Adjustable- default-language: Haskell2010- type: exitcode-stdio-1.0- main-is: Adjustable.hs- hs-source-dirs: test- build-depends: base- , containers- , dependent-sum- , reflex- , ref-tf- , these-- other-modules:- Test.Run+ 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.22+ , containers+ , dependent-sum+ , reflex+ , ref-tf+ , these test-suite QueryT- default-language: Haskell2010- type: exitcode-stdio-1.0- main-is: QueryT.hs- hs-source-dirs: test- build-depends: base- , commutative-semigroups- , containers- , dependent-map- , dependent-sum- , deepseq- , lens- , monoidal-containers- , mtl- , patch- , ref-tf- , reflex- , these- , transformers+ 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 - if flag(split-these)- build-depends: semialign, these-lens+ default-language: Haskell2010+ build-depends:+ base >= 4.11 && < 4.22+ , commutative-semigroups+ , containers+ , dependent-map+ , dependent-sum+ , deepseq+ , lens+ , monoidal-containers+ , mtl+ , patch+ , ref-tf+ , reflex+ , these+ , transformers - other-modules:- Test.Run- Reflex.TestPlan- Reflex.Plan.Reflex- Reflex.Plan.Pure+ if flag(split-these)+ build-depends:+ semialign+ , these-lens test-suite GC-Semantics- default-language: Haskell2010- type: exitcode-stdio-1.0- main-is: GC.hs- hs-source-dirs: test- build-depends: base- , containers- , dependent-sum- , dependent-map- , deepseq- , mtl- , patch- , these- , transformers- , reflex- , ref-tf+ 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 - if flag(split-these)- build-depends: semialign+ default-language: Haskell2010+ build-depends:+ base >= 4.11 && < 4.22+ , containers+ , dependent-sum+ , dependent-map+ , deepseq+ , mtl+ , patch+ , these+ , transformers+ , reflex+ , ref-tf - other-modules:- Reflex.Plan.Pure- Reflex.Plan.Reflex- Reflex.TestPlan- Test.Run+ if flag(split-these)+ build-depends: semialign test-suite rootCleanup- default-language: Haskell2010- type: exitcode-stdio-1.0- main-is: rootCleanup.hs- hs-source-dirs: test- build-depends: base- , containers- , deepseq- , dependent-sum- , mtl- , reflex- , ref-tf- , these- other-modules:- Reflex.Plan.Pure- Reflex.TestPlan- Test.Run+ 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.22+ , containers+ , deepseq+ , dependent-sum+ , mtl+ , reflex+ , ref-tf+ , these+ benchmark spider-bench- default-language: Haskell2010- type: exitcode-stdio-1.0- hs-source-dirs: bench test- main-is: Main.hs- ghc-options: -Wall -O2 -rtsopts- build-depends:- base,- containers,- criterion,- deepseq,- dependent-map,- dependent-sum,- ref-tf,- mtl,- primitive,- reflex,- split,- stm,- transformers- other-modules:- Reflex.TestPlan- Reflex.Plan.Reflex- Reflex.Bench.Focused+ 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.22+ , containers+ , criterion+ , deepseq+ , dependent-map+ , dependent-sum+ , ref-tf+ , mtl+ , primitive+ , reflex+ , split+ , stm+ , transformers++ if arch(javascript)+ buildable: False+ benchmark saulzar-bench- default-language: Haskell2010- type: exitcode-stdio-1.0- hs-source-dirs: bench test- c-sources: bench-cbits/checkCapability.c- main-is: RunAll.hs- ghc-options: -Wall -O2 -rtsopts -threaded- build-depends:- base,- containers,- criterion,- deepseq,- dependent-map,- dependent-sum,- loch-th,- mtl,- primitive,- process,- ref-tf,- reflex,- split,- stm,- time,- transformers- other-modules:- Reflex.TestPlan- Reflex.Plan.Reflex- Reflex.Bench.Focused+ 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 -source-repository head- type: git- location: https://github.com/reflex-frp/reflex+ default-language: Haskell2010+ ghc-options: -Wall -O2 -rtsopts -threaded+ build-depends:+ base >= 4.11 && < 4.22+ , containers+ , criterion+ , deepseq+ , dependent-map+ , dependent-sum+ , loch-th+ , mtl+ , primitive+ , process+ , ref-tf+ , reflex+ , split+ , stm+ , time+ , transformers++ if arch(javascript)+ buildable: False
src/Control/Monad/ReaderIO.hs view
@@ -2,14 +2,12 @@ {-# language MultiParamTypeClasses #-} {-# language FlexibleInstances #-} {-# language CPP #-}+ module Control.Monad.ReaderIO- (- ReaderIO (..)- )- where+ ( ReaderIO (..)+ ) where import Control.Monad.Fix-import Control.Applicative import Control.Monad import Control.Monad.Reader.Class import Control.Monad.IO.Class@@ -32,8 +30,10 @@ {-# INLINE pure #-} (<*>) = ap {-# INLINE (<*>) #-}+#if MIN_VERSION_base(4,18,0) liftA2 = liftM2 {-# INLINE liftA2 #-}+#endif instance Monad (ReaderIO e) where ReaderIO q >>= f = ReaderIO $ \e -> q e >>= \a -> runReaderIO (f a) e
src/Data/AppendMap.hs view
@@ -7,6 +7,7 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-orphans #-}+ -- | -- Module: -- Data.AppendMap@@ -26,7 +27,6 @@ import Data.Default import Data.Map (Map) import qualified Data.Map.Internal.Debug as Map (showTree, showTreeWith)- import Data.Map.Monoidal
src/Data/FastMutableIntMap.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE TypeFamilies #-}+ -- | -- Module: -- Data.FastMutableIntMap
src/Data/FastWeakBag.hs view
@@ -1,12 +1,10 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE ExistentialQuantification #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif #ifdef GHCJS_FAST_WEAK {-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE JavaScriptFFI #-} #endif+ -- | This module defines the 'FastWeakBag' type, which represents a mutable -- collection of items that does not cause the items to be retained in memory. -- This is useful for situations where a value needs to be inspected or modified
src/Data/Map/Misc.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE LambdaCase #-}+ -- | Additional functions for manipulating 'Map's. module Data.Map.Misc (
src/Data/WeakBag.hs view
@@ -1,9 +1,7 @@ {-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE ExistentialQuantification #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif+ -- | This module defines the 'WeakBag' type, which represents a mutable -- collection of items that does not cause the items to be retained in memory. -- This is useful for situations where a value needs to be inspected or modified
src/Reflex.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+ -- | This module exports all of the commonly-used functionality of Reflex; if -- you are just getting started with Reflex, this is probably what you want. module Reflex@@ -13,9 +14,7 @@ import Reflex.Dynamic as X import Reflex.EventWriter.Base as X import Reflex.EventWriter.Class as X-#ifdef USE_TEMPLATE_HASKELL import Reflex.Dynamic.TH as X-#endif import Reflex.Dynamic.Uniq as X import Reflex.DynamicWriter.Base as X import Reflex.DynamicWriter.Class as X
src/Reflex/Adjustable/Class.hs view
@@ -7,9 +7,7 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif+ -- | -- Module: -- Reflex.Adjustable.Class
src/Reflex/BehaviorWriter/Base.hs view
@@ -13,9 +13,7 @@ {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE StandaloneDeriving #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif+ module Reflex.BehaviorWriter.Base ( BehaviorWriterT (..) , runBehaviorWriterT@@ -39,6 +37,10 @@ import Data.Map (Map) import qualified Data.Map as Map import Data.Some (Some)++#if !MIN_VERSION_base(4,18,0)+import Control.Monad.Identity+#endif import Reflex.Class import Reflex.Adjustable.Class
src/Reflex/BehaviorWriter/Class.hs view
@@ -7,9 +7,7 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE UndecidableInstances #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif+ module Reflex.BehaviorWriter.Class ( MonadBehaviorWriter , BehaviorWriter(..)
src/Reflex/Class.hs view
@@ -17,9 +17,6 @@ {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE Trustworthy #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif -- | -- Module:
src/Reflex/Collection.hs view
@@ -7,9 +7,7 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif+ -- | -- Module: -- Reflex.Collection@@ -42,6 +40,10 @@ import qualified Data.Map as Map import Data.Map.Misc import Data.These++#if !MIN_VERSION_base(4,18,0)+import Control.Monad.Identity+#endif import Reflex.Class import Reflex.Adjustable.Class
src/Reflex/Dynamic.hs view
@@ -14,9 +14,7 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif+ -- | -- Module: -- Reflex.Dynamic@@ -78,16 +76,14 @@ , unsafeDynamic ) where -import Data.Functor.Compose-import Data.Functor.Misc-import Reflex.Class- import Control.Monad.Fix import Control.Monad.Identity import Data.Align import Data.Dependent.Map (DMap) import qualified Data.Dependent.Map as DMap import Data.Dependent.Sum (DSum (..))+import Data.Functor.Compose+import Data.Functor.Misc import Data.GADT.Compare (GCompare (..), GEq (..), GOrdering (..)) import Data.IntMap (IntMap) import Data.Kind (Type)@@ -97,6 +93,13 @@ import Data.Type.Equality ((:~:) (..)) import Debug.Trace (trace)++#if !MIN_VERSION_base(4,18,0)+import Control.Monad+import Data.Monoid ((<>))+#endif++import Reflex.Class -- | Map a sampling function over a 'Dynamic'. mapDynM :: forall t m a b. (Reflex t, MonadHold t m) => (forall m'. MonadSample t m' => a -> m' b) -> Dynamic t a -> m (Dynamic t b)
src/Reflex/Dynamic/TH.hs view
@@ -5,9 +5,7 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif+ -- | Template Haskell helper functions for building complex 'Dynamic' values. module Reflex.Dynamic.TH ( qDynPure@@ -15,8 +13,6 @@ , mkDynPure ) where -import Reflex.Dynamic- import Control.Monad.State import Data.Data import Data.Generics@@ -25,6 +21,12 @@ import Language.Haskell.TH import Language.Haskell.TH.Quote import qualified Language.Haskell.TH.Syntax as TH++#if !MIN_VERSION_base(4,18,0)+import Data.Monoid ((<>))+#endif++import Reflex.Dynamic -- | Quote a 'Dynamic' expression. Within the quoted expression, you can use -- @$(unqDyn [| x |])@ to refer to any expression @x@ of type @Dynamic t a@; the
src/Reflex/Dynamic/Uniq.hs view
@@ -2,9 +2,7 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE MultiParamTypeClasses #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif+ -- | This module provides a variation of 'Dynamic' values that uses cheap -- pointer equality checks to reduce the amount of signal propagation needed. module Reflex.Dynamic.Uniq@@ -15,6 +13,11 @@ ) where import GHC.Exts++#if !MIN_VERSION_base(4,18,0)+import Control.Applicative (Applicative(..))+#endif+ import Reflex.Class -- | A 'Dynamic' whose 'updated' 'Event' will never fire with the same value as
src/Reflex/DynamicWriter/Base.hs view
@@ -11,9 +11,7 @@ {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE StandaloneDeriving #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif+ module Reflex.DynamicWriter.Base ( DynamicWriterT (..) , runDynamicWriterT@@ -41,6 +39,11 @@ import qualified Data.Map as Map import Data.Some (Some) import Data.These++#if !MIN_VERSION_base(4,18,0)+import Control.Monad.Identity+import Data.Semigroup (Semigroup(..))+#endif import Reflex.Adjustable.Class import Reflex.Class
src/Reflex/DynamicWriter/Class.hs view
@@ -4,9 +4,7 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE UndecidableInstances #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif+ module Reflex.DynamicWriter.Class ( MonadDynamicWriter , DynamicWriter(..)
src/Reflex/EventWriter/Base.hs view
@@ -10,9 +10,7 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif+ module Reflex.EventWriter.Base ( EventWriterT (..) , runEventWriterT
src/Reflex/EventWriter/Class.hs view
@@ -3,14 +3,16 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE UndecidableInstances #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif+ module Reflex.EventWriter.Class ( EventWriter (..) ) where import Control.Monad.Reader (ReaderT, lift)++#if !MIN_VERSION_base(4,18,0)+import Data.Semigroup (Semigroup)+#endif import Reflex.Class (Event)
src/Reflex/Host/Class.hs view
@@ -10,9 +10,7 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif+ -- | This module provides the interface for hosting 'Reflex' engines. This -- should only be necessary if you're writing a binding or some other library -- that provides a core event loop.
src/Reflex/Host/Headless.hs view
@@ -39,6 +39,7 @@ , MonadSample t (Performable m) , MonadSample t m , MonadThrow m+ , MonadThrow (Performable m) , NotReady t m , PerformEvent t m , PostBuild t m
src/Reflex/Network.hs view
@@ -1,8 +1,6 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE MultiParamTypeClasses #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif+ -- | -- Module: -- Reflex.Network
src/Reflex/NotReady/Class.hs view
@@ -6,9 +6,7 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif+ module Reflex.NotReady.Class ( NotReady(..) ) where
− src/Reflex/Optimizer.hs
@@ -1,63 +0,0 @@-{-# LANGUAGE CPP #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE OverloadedStrings #-}--- |--- Module:--- Reflex.Optimizer--- Description:--- This module provides a GHC plugin designed to improve code that uses--- Reflex. Currently, it just adds an INLINABLE pragma to any top-level--- definition that doesn't have an explicit inlining pragma. In the future,--- additional optimizations are likely to be added.-module Reflex.Optimizer- ( plugin- ) where--#ifdef ghcjs_HOST_OS-import Plugins-#else-import Control.Arrow-import CoreMonad-import Data.String-import GhcPlugins--import Prelude hiding ((<>))--#endif--#ifdef ghcjs_HOST_OS---- | The GHCJS build of Reflex.Optimizer just throws an error; instead, the version built with GHC should be used.-plugin :: Plugin-plugin = error "The GHCJS build of Reflex.Optimizer cannot be used. Instead, build with GHC and use the result with GHCJS."--#else---- | The GHC plugin itself. See "GhcPlugins" for more details.-plugin :: Plugin-plugin = defaultPlugin { installCoreToDos = install }--install :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]-install [] p = do- liftIO $ putStrLn $ showSDocUnsafe $ ppr p- let f = \case- simpl@(CoreDoSimplify _ _) -> [CoreDoSpecialising, simpl]- x -> [x]- return $ makeInlinable : concatMap f p-install options@(_:_) p = do- warnMsg $ "Reflex.Optimizer: ignoring " <> fromString (show $ length options) <> " command-line options"- install [] p--makeInlinable :: CoreToDo-makeInlinable = CoreDoPluginPass "MakeInlinable" $ \modGuts -> do- let f v = setIdInfo v $ let i = idInfo v in- setInlinePragInfo i $ let p = inlinePragInfo i in- if isDefaultInlinePragma p- then defaultInlinePragma { inl_inline = Inlinable }- else p- newBinds = flip map (mg_binds modGuts) $ \case- NonRec b e -> NonRec (f b) e- Rec bes -> Rec $ map (first f) bes- return $ modGuts { mg_binds = newBinds }--#endif
src/Reflex/PerformEvent/Base.hs view
@@ -15,24 +15,21 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif+ module Reflex.PerformEvent.Base ( PerformEventT (..) , FireCommand (..) , hostPerformEventT ) where -import Reflex.Class import Reflex.Adjustable.Class+import Reflex.Class import Reflex.Host.Class import Reflex.PerformEvent.Class import Reflex.Requester.Base import Reflex.Requester.Class -import Control.Lens-import Control.Monad.Catch (MonadMask, MonadThrow, MonadCatch)+import Control.Monad.Catch (MonadCatch, MonadMask, MonadThrow) import Control.Monad.Exception import Control.Monad.Fix import Control.Monad.Primitive@@ -42,9 +39,14 @@ import Data.Dependent.Map (DMap) import qualified Data.Dependent.Map as DMap import Data.Dependent.Sum+import Data.Functor.Identity import Data.IntMap.Strict (IntMap) import qualified Data.IntMap.Strict as IntMap import qualified Data.Semigroup as S++#if !MIN_VERSION_base(4,18,0)+import Control.Monad.Identity+#endif -- | A function that fires events for the given 'EventTrigger's and then runs -- any followup actions provided via 'PerformEvent'. The given 'ReadPhase'
src/Reflex/PerformEvent/Class.hs view
@@ -9,9 +9,7 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif+ module Reflex.PerformEvent.Class ( PerformEvent (..) , performEventAsync@@ -20,8 +18,11 @@ import Control.Monad import Control.Monad.Reader import Control.Monad.Trans.Maybe (MaybeT (..))- import Data.Kind (Type)++#if !MIN_VERSION_base(4,18,0)+import Control.Monad.Fix+#endif import Reflex.Class import Reflex.TriggerEvent.Class
src/Reflex/PostBuild/Base.hs view
@@ -10,9 +10,7 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif+ module Reflex.PostBuild.Base ( PostBuildT (..) , runPostBuildT@@ -21,14 +19,6 @@ , mapDMapWithAdjustImpl ) where -import Reflex.Class-import Reflex.Adjustable.Class-import Reflex.Host.Class-import Reflex.PerformEvent.Class-import Reflex.PostBuild.Class-import Reflex.TriggerEvent.Class--import Control.Applicative (liftA2) import Control.Monad.Catch (MonadMask, MonadThrow, MonadCatch) import Control.Monad.Exception import Control.Monad.Fix@@ -42,6 +32,18 @@ import Data.IntMap.Strict (IntMap) import qualified Data.IntMap.Strict as IntMap import qualified Data.Semigroup as S++#if !MIN_VERSION_base(4,18,0)+import Control.Applicative (liftA2)+import Control.Monad.Identity+#endif++import Reflex.Class+import Reflex.Adjustable.Class+import Reflex.Host.Class+import Reflex.PerformEvent.Class+import Reflex.PostBuild.Class+import Reflex.TriggerEvent.Class -- | Provides a basic implementation of 'PostBuild'. newtype PostBuildT t m a = PostBuildT { unPostBuildT :: ReaderT (Event t ()) m a }
src/Reflex/PostBuild/Class.hs view
@@ -7,9 +7,7 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif+ module Reflex.PostBuild.Class ( PostBuild (..) ) where
src/Reflex/Profiled.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-}@@ -11,6 +12,7 @@ {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE RankNTypes #-}+ -- | -- Module: -- Reflex.Profiled@@ -44,6 +46,12 @@ import GHC.Foreign import GHC.IO.Encoding import GHC.Stack+import System.IO.Unsafe++#if !MIN_VERSION_base(4,18,0)+import Data.Monoid ((<>))+#endif+ import Reflex.Adjustable.Class import Reflex.BehaviorWriter.Class import Reflex.Class@@ -56,8 +64,6 @@ import Reflex.Query.Class import Reflex.Requester.Class import Reflex.TriggerEvent.Class--import System.IO.Unsafe data ProfiledTimeline t
src/Reflex/Pure.hs view
@@ -8,15 +8,11 @@ {-# LANGUAGE TypeOperators #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE PolyKinds #-}--#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif- -- There are two expected orphan instances in this module: -- * MonadSample (Pure t) ((->) t) -- * MonadHold (Pure t) ((->) t) {-# OPTIONS_GHC -fno-warn-orphans #-}+ -- | -- Module: Reflex.Pure -- Description:
src/Reflex/Query/Base.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE InstanceSigs #-}@@ -19,7 +20,6 @@ , mapQueryT ) where -import Control.Applicative (liftA2) import Control.Monad.Catch (MonadMask, MonadThrow, MonadCatch) import Control.Monad.Exception import Control.Monad.Fix@@ -45,6 +45,11 @@ import Data.Semigroup.Commutative import Data.Some (Some(Some)) import Data.These++#if !MIN_VERSION_base(4,18,0)+import Control.Applicative (liftA2)+import Data.Monoid ((<>))+#endif import Reflex.Class import Reflex.Adjustable.Class
src/Reflex/Query/Class.hs view
@@ -6,6 +6,7 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-}+ -- | -- Module: -- Reflex.Query.Class@@ -27,7 +28,6 @@ , mapQueryResult ) where -import Control.Applicative import Control.Category (Category) import qualified Control.Category as Cat import Control.Monad.Reader@@ -41,6 +41,11 @@ import Data.Void import Data.Monoid hiding ((<>)) import Foreign.Storable++#if !MIN_VERSION_base(4,18,0)+import Control.Applicative+import Data.Semigroup (Semigroup(..))+#endif import Reflex.Class
src/Reflex/Requester/Base/Internal.hs view
@@ -16,22 +16,9 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif-module Reflex.Requester.Base.Internal where -import Reflex.Class-import Reflex.Adjustable.Class-import Reflex.Dynamic-import Reflex.EventWriter.Class-import Reflex.Host.Class-import Reflex.PerformEvent.Class-import Reflex.PostBuild.Class-import Reflex.Requester.Class-import Reflex.TriggerEvent.Class+module Reflex.Requester.Base.Internal where -import Control.Applicative (liftA2) import Control.Monad import Control.Monad.Catch (MonadMask, MonadThrow, MonadCatch) import Control.Monad.Exception@@ -62,6 +49,21 @@ import GHC.Exts (Any) import Unsafe.Coerce++#if !MIN_VERSION_base(4,18,0)+import Control.Applicative (liftA2)+import Data.Monoid ((<>))+#endif++import Reflex.Class+import Reflex.Adjustable.Class+import Reflex.Dynamic+import Reflex.EventWriter.Class+import Reflex.Host.Class+import Reflex.PerformEvent.Class+import Reflex.PostBuild.Class+import Reflex.Requester.Class+import Reflex.TriggerEvent.Class --TODO: Make this module type-safe
src/Reflex/Requester/Class.hs view
@@ -10,9 +10,7 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif+ module Reflex.Requester.Class ( Requester (..) , withRequesting@@ -40,6 +38,8 @@ type Response m :: Type -> Type -- | Emit a request whenever the given 'Event' fires, and return responses in -- the resulting 'Event'.+ --+ -- Semantically, the response event occurs at a later time than the request event. requesting :: Event t (Request m a) -> m (Event t (Response m a)) -- | Emit a request whenever the given 'Event' fires, and ignore all responses. requesting_ :: Event t (Request m a) -> m ()
src/Reflex/Spider.hs view
@@ -1,20 +1,21 @@ {-# LANGUAGE CPP #-}+ -- | -- Module: -- Reflex.Spider -- Description: -- This module exports all of the user-facing functionality of the 'Spider' 'Reflex' engine module Reflex.Spider- ( Spider- , SpiderTimeline- , Global- , SpiderHost- , runSpiderHost- , runSpiderHostForTimeline- , newSpiderTimeline- , withSpiderTimeline- -- * Deprecated- , SpiderEnv- ) where+ ( Spider+ , SpiderTimeline+ , Global+ , SpiderHost+ , runSpiderHost+ , runSpiderHostForTimeline+ , newSpiderTimeline+ , withSpiderTimeline+ -- * Deprecated+ , SpiderEnv+ ) where import Reflex.Spider.Internal
src/Reflex/Spider/Internal.hs view
@@ -20,31 +20,25 @@ {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE MultiWayIf #-}--#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif {-# OPTIONS_GHC -Wunused-binds #-}+ -- | This module is the implementation of the 'Spider' 'Reflex' engine. It uses -- a graph traversal algorithm to propagate 'Event's and 'Behavior's.-module Reflex.Spider.Internal (module Reflex.Spider.Internal) where+module Reflex.Spider.Internal+ ( module Reflex.Spider.Internal+ ) where -import Control.Applicative (liftA2) import Control.Concurrent import Control.Exception import Control.Monad hiding (forM, forM_, mapM, mapM_) import Control.Monad.Catch (MonadMask, MonadThrow, MonadCatch) import Control.Monad.Exception import Control.Monad.Fix-import Control.Monad.Identity import Control.Monad.Primitive import Control.Monad.Reader.Class import Control.Monad.IO.Class import Control.Monad.ReaderIO import Control.Monad.Ref-#if !MIN_VERSION_base(4,13,0)-import Control.Monad.Fail (MonadFail)-#endif import qualified Control.Monad.Fail as MonadFail import Data.Align import Data.Coerce@@ -76,6 +70,16 @@ import Unsafe.Coerce import Witherable (Filterable, mapMaybe) +#if !MIN_VERSION_base(4,18,0)+import Control.Applicative (liftA2)+import Control.Monad.Identity hiding (forM, forM_, mapM, mapM_)+import Control.Monad.Fail (MonadFail)+import Data.List (isPrefixOf)+import Data.Monoid (mempty, (<>))+#else+import Control.Monad.Identity+#endif+ #ifdef MIN_VERSION_semialign #if MIN_VERSION_these(0,8,0) import Data.These.Combinators (justThese)@@ -290,7 +294,7 @@ return (subscription, occ) --TODO: Make this lazy in its input event-headE :: (Defer (SomeMergeInit x) m) => Event x a -> m (Event x a)+headE :: Defer (SomeMergeInit x) m => Event x a -> m (Event x a) headE originalE = do parent <- liftIO $ newIORef $ Just originalE defer $ SomeMergeInit $ do --TODO: Rename SomeMergeInit appropriately@@ -311,11 +315,10 @@ #endif } -nowSpiderEventM :: (HasSpiderTimeline x) => EventM x (R.Event (SpiderTimeline x) ())-nowSpiderEventM =- SpiderEvent <$> now+nowSpiderEventM :: HasSpiderTimeline x => EventM x (R.Event (SpiderTimeline x) ())+nowSpiderEventM = SpiderEvent <$> now -now :: (Defer (Some Clear) m) => m (Event x ())+now :: Defer (Some Clear) m => m (Event x ()) now = do nowOrNot <- liftIO $ newIORef $ Just () scheduleClear nowOrNot@@ -536,10 +539,12 @@ newSubscriberCoincidenceInner :: forall x a. HasSpiderTimeline x => CoincidenceSubscribed x a -> IO (Subscriber x a) newSubscriberCoincidenceInner subscribed = debugSubscriber ("SubscriberCoincidenceInner" <> showNodeId subscribed) $ Subscriber { subscriberPropagate = \a -> {-# SCC "traverseCoincidenceInner" #-} do+#ifdef DEBUG occ <- liftIO $ readIORef $ coincidenceSubscribedOccurrence subscribed case occ of- Just _ -> return () -- SubscriberCoincidenceOuter must have already propagated this event+ Just _ -> error "Coincidence inner is propagating, but coincidence occurrence is already known?" Nothing -> do+#endif liftIO $ writeIORef (coincidenceSubscribedOccurrence subscribed) $ Just a scheduleClear $ coincidenceSubscribedOccurrence subscribed propagate a $ coincidenceSubscribedSubscribers subscribed@@ -1158,9 +1163,7 @@ , switchSubscribed :: !(IORef (Maybe (SwitchSubscribed x a))) } -#ifdef USE_TEMPLATE_HASKELL {-# ANN CoincidenceSubscribed "HLint: ignore Redundant bracket" #-}-#endif data CoincidenceSubscribed x a = CoincidenceSubscribed { coincidenceSubscribedCachedSubscribed :: !(IORef (Maybe (CoincidenceSubscribed x a))) , coincidenceSubscribedOccurrence :: !(IORef (Maybe a))@@ -1609,9 +1612,7 @@ occ <- getOcc return (sln, subscribed, occ) -#ifdef USE_TEMPLATE_HASKELL {-# ANN cleanupRootSubscribed "HLint: ignore Redundant bracket" #-}-#endif cleanupRootSubscribed :: RootSubscribed x a -> IO () cleanupRootSubscribed self@RootSubscribed { rootSubscribedKey = k, rootSubscribedCachedSubscribed = cached } = do rootSubscribedUninit self@@ -2106,7 +2107,7 @@ {-# INLINE mergeGCheap' #-} mergeGCheap' :: forall k v x p s q. (HasSpiderTimeline x, GCompare k, PatchTarget p ~ DMap k q) => MergeGetSubscription x s -> MergeInitFunc k v q x s -> MergeUpdateFunc k v x p s -> MergeDestroyFunc k s -> DynamicS x p -> Event x (DMap k v)-mergeGCheap' getParent getInitialSubscribers updateFunc destroy d = Event $ \sub -> do+mergeGCheap' _ getInitialSubscribers updateFunc destroy d = Event $ \sub -> do initialParents <- readBehaviorUntracked $ dynamicCurrent d accumRef <- liftIO $ newIORef $ error "merge: accumRef not yet initialized" heightRef <- liftIO $ newIORef $ error "merge: heightRef not yet initialized"
src/Reflex/Time.hs view
@@ -4,13 +4,11 @@ {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecursiveDo #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeFamilies #-}-#ifdef USE_TEMPLATE_HASKELL-{-# LANGUAGE TemplateHaskell #-}-#endif -- | -- Module: -- Reflex.Time@@ -18,15 +16,8 @@ -- Clocks, timers, and other time-related functions. module Reflex.Time where -import Reflex.Class-import Reflex.Dynamic-import Reflex.PerformEvent.Class-import Reflex.PostBuild.Class-import Reflex.TriggerEvent.Class- import Control.Concurrent import qualified Control.Concurrent.Thread.Delay as Concurrent-import Control.Lens hiding ((|>)) import Control.Monad import Control.Monad.Fix import Control.Monad.IO.Class@@ -40,6 +31,16 @@ import GHC.Generics (Generic) import System.Random +#if !MIN_VERSION_base(4,18,0)+import Data.Semigroup (Semigroup(..))+#endif++import Reflex.Class+import Reflex.Dynamic+import Reflex.PerformEvent.Class+import Reflex.PostBuild.Class+import Reflex.TriggerEvent.Class+ -- | Metadata associated with a timer "tick" data TickInfo = TickInfo { _tickInfo_lastUTC :: UTCTime@@ -365,18 +366,14 @@ delayed <- lag (void outE) return outE -#ifdef USE_TEMPLATE_HASKELL-makeLensesWith (lensRules & simpleLenses .~ True) ''TickInfo-#else-tickInfo_lastUTC :: Lens' TickInfo UTCTime+tickInfo_lastUTC :: Functor f => (UTCTime -> f UTCTime) -> TickInfo -> f TickInfo tickInfo_lastUTC f (TickInfo x1 x2 x3) = (\y -> TickInfo y x2 x3) <$> f x1 {-# INLINE tickInfo_lastUTC #-} -tickInfo_n :: Lens' TickInfo Integer+tickInfo_n :: Functor f => (Integer -> f Integer ) -> TickInfo -> f TickInfo tickInfo_n f (TickInfo x1 x2 x3) = (\y -> TickInfo x1 y x3) <$> f x2 {-# INLINE tickInfo_n #-} -tickInfo_alreadyElapsed :: Lens' TickInfo NominalDiffTime-tickInfo_alreadyElapsed f (TickInfo x1 x2 x3) = (\y -> TickInfo x1 x2 y) <$> f x3+tickInfo_alreadyElapsed :: Functor f => (NominalDiffTime -> f NominalDiffTime) -> TickInfo -> f TickInfo+tickInfo_alreadyElapsed f (TickInfo x1 x2 x3) = TickInfo x1 x2 <$> f x3 {-# INLINE tickInfo_alreadyElapsed #-}-#endif
src/Reflex/TriggerEvent/Base.hs view
@@ -1,11 +1,13 @@ -- | This module defines 'TriggerEventT', the standard implementation of -- 'TriggerEvent'.+{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-}+ module Reflex.TriggerEvent.Base ( TriggerEventT (..) , runTriggerEventT@@ -14,7 +16,6 @@ , EventTriggerRef (..) ) where -import Control.Applicative (liftA2) import Control.Concurrent import Control.Monad.Catch (MonadMask, MonadThrow, MonadCatch) import Control.Monad.Exception@@ -26,6 +27,12 @@ import Data.Dependent.Sum import Data.IORef import qualified Data.Semigroup as S++#if !MIN_VERSION_base(4,18,0)+import Control.Applicative (liftA2)+import Data.Monoid ((<>))+#endif+ import Reflex.Class import Reflex.Adjustable.Class import Reflex.Host.Class
src/Reflex/TriggerEvent/Class.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE UndecidableInstances #-}+ module Reflex.TriggerEvent.Class ( TriggerEvent (..) ) where
src/Reflex/Widget/Basic.hs view
@@ -2,9 +2,6 @@ {-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RecursiveDo #-}-#ifdef USE_REFLEX_OPTIMIZER-{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}-#endif module Reflex.Widget.Basic where
src/Reflex/Workflow.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE RecursiveDo #-} {-# LANGUAGE ScopedTypeVariables #-}+ -- | -- Module: -- Reflex.Workflow@@ -7,8 +8,8 @@ -- Provides a convenient way to describe a series of interrelated widgets that -- can send data to, invoke, and replace one another. Useful for modeling user interface -- "workflows."-module Reflex.Workflow (- Workflow (..)+module Reflex.Workflow+ ( Workflow (..) , workflow , workflowView , mapWorkflow
test/hlint.hs view
@@ -22,7 +22,6 @@ , "--ignore=Use unless" , "--ignore=Reduce duplication" , "--ignore=Replace case with maybe"- , "--cpp-define=USE_TEMPLATE_HASKELL" , "--cpp-define=DEBUG" , "--ignore=Use tuple-section" ]