reflex-basic-host 0.2 → 0.2.0.1
raw patch · 3 files changed
+42/−17 lines, 3 filesdep −dependent-mapdep ~lens
Dependencies removed: dependent-map
Dependency ranges changed: lens
Files
- ChangeLog.md +5/−0
- reflex-basic-host.cabal +16/−10
- src/Reflex/Host/Basic.hs +21/−7
ChangeLog.md view
@@ -1,5 +1,10 @@ # ChangeLog +## 0.2.0.1 - 2019-10-29++* Documentation fixups.+* Removed redundant dependencies from cabal file.+ ## 0.2 - 2019-10-28 * Added `Reflex.Host.Basic.repeatUntilQuit_`, with the same behaviour
reflex-basic-host.cabal view
@@ -1,16 +1,27 @@ name: reflex-basic-host-version: 0.2+version: 0.2.0.1 license: BSD3 license-file: LICENCE author: Dave Laing-maintainer: dave.laing.80@gmail.com+maintainer: dave.laing.80@gmail.com, jack.kelly@data61.csiro.au+homepage: https://github.com/qfpl/reflex-basic-host/+bug-reports: https://github.com/qfpl/reflex-basic-host/issues copyright: Copyright (c) 2019, Commonwealth Scientific and Industrial Research Organisation (CSIRO) ABN 41 687 119 230. build-type: Simple extra-source-files: ChangeLog.md cabal-version: >=1.10 category: FRP-synopsis: A basic `reflex` host for backend work-description: A basic `reflex` host for backend work.+synopsis: A basic Reflex host for backend work+description:+ <<https://raw.githubusercontent.com/qfpl/assets/master/data61-transparent-bg.png>>+ .+ reflex-basic-host provides a basic Reflex host for backend work. It+ provides instances for most of the important Reflex typeclasses.+ .+ @Reflex.Host.Basic.basicHostWithQuit@ is the main entry point for+ running FRP code. Use the @TriggerEvent@ instance to construct+ @Event@s and control when they fire, and use the @PerformEvent@+ instance to take actions in response to @Event@ firings. tested-with: GHC == 8.0.2 , GHC == 8.2.2@@ -24,9 +35,8 @@ library exposed-modules: Reflex.Host.Basic build-depends: base >=4.9 && <4.14- , dependent-map >= 0.2 && < 0.4 , dependent-sum >= 0.4 && < 0.7- , lens >= 3.6 && < 4.18+ , lens >= 3.6 && < 4.19 , mtl >= 2.2 && < 2.3 , primitive >= 0.6 && < 0.8 , ref-tf >= 0.4 && < 0.5@@ -39,7 +49,6 @@ executable example main-is: Main.hs build-depends: base >=4.9 && <4.14- , mtl >= 2.2 && < 2.3 , reflex >= 0.6 && < 0.7 , reflex-basic-host hs-source-dirs: example@@ -49,7 +58,6 @@ executable counter main-is: Counter.hs build-depends: base >=4.9 && <4.14- , mtl >= 2.2 && < 2.3 , reflex >= 0.6 && < 0.7 , reflex-basic-host hs-source-dirs: example@@ -60,8 +68,6 @@ main-is: Multithread.hs build-depends: base >=4.9 && <4.14 , lens >= 3.6 && < 4.18- , mtl >= 2.2 && < 2.3- , ref-tf >= 0.4 && < 0.5 , reflex >= 0.6 && < 0.7 , reflex-basic-host , witherable >= 0.2 && < 0.4
src/Reflex/Host/Basic.hs view
@@ -2,9 +2,9 @@ Module : Reflex.Host.Basic Copyright : (c) 2019 Commonwealth Scientific and Industrial Research Organisation (CSIRO) License : BSD-3-Maintainer : dave.laing.80@gmail.com+Maintainer : dave.laing.80@gmail.com, jack.kelly@data61.csiro.au -'BasicGuest' provides instances that most `reflex` programs need:+'BasicGuest' provides instances that most Reflex programs need: * 'MonadIO' * 'MonadFix'@@ -17,7 +17,7 @@ * 'Adjustable' For some usage examples, see-<https://github.com/qfpl/reflex-basic-host/tree/master/example the example directory>+<https://github.com/qfpl/reflex-basic-host/tree/master/example the example directory>. -} @@ -31,10 +31,16 @@ {-# LANGUAGE UndecidableInstances #-} module Reflex.Host.Basic- ( BasicGuest- , BasicGuestConstraints- , basicHostWithQuit+ (+ -- * Running the host+ basicHostWithQuit , basicHostForever++ -- * Types+ , BasicGuest+ , BasicGuestConstraints++ -- * Utilities , repeatUntilQuit , repeatUntilQuit_ ) where@@ -57,6 +63,8 @@ import Reflex import Reflex.Host.Class +-- | Constraints provided by a 'BasicGuest', when run by+-- 'basicHostWithQuit' or 'basicHostForever'. type BasicGuestConstraints t (m :: * -> *) = ( MonadReflexHost t m , MonadHold t m@@ -70,6 +78,12 @@ , MonadFix m ) +-- | The basic guest type. Try not to code against it directly;+-- instead ask for the features you need MTL-style:+--+-- @+-- myFunction :: (Reflex t, MonadHold m) => ...+-- @ newtype BasicGuest t (m :: * -> *) a = BasicGuest { unBasicGuest :: PostBuildT t (TriggerEventT t (PerformEventT t m)) a@@ -181,7 +195,7 @@ -- | Run a 'BasicGuest', and return when the 'Event' returned by the -- 'BasicGuest' fires. ----- Each call runs on a separate spider timeline, so you can launch+-- Each host runs on a separate spider timeline, so you can launch -- multiple hosts via 'Control.Concurrent.forkIO' or -- 'Control.Concurrent.forkOS' and they will not mutex each other. --