summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqfpl <>2019-10-29 05:49:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2019-10-29 05:49:00 (GMT)
commitb56396341a3419670e011b048589bbad8d8a89d5 (patch)
tree05700aca66608fba86d6790ebf28496e3c985ebc
parentb315e081ef9630ca274b93710530127587df334a (diff)
version 0.2.0.1HEAD0.2.0.1master
-rwxr-xr-xChangeLog.md5
-rw-r--r--reflex-basic-host.cabal26
-rw-r--r--src/Reflex/Host/Basic.hs28
3 files changed, 42 insertions, 17 deletions
diff --git a/ChangeLog.md b/ChangeLog.md
index d397093..50aa943 100755
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -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
diff --git a/reflex-basic-host.cabal b/reflex-basic-host.cabal
index 3d0f849..c9e25e7 100644
--- a/reflex-basic-host.cabal
+++ b/reflex-basic-host.cabal
@@ -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 @@ source-repository head
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 @@ library
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 example
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 @@ executable multithread
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
diff --git a/src/Reflex/Host/Basic.hs b/src/Reflex/Host/Basic.hs
index 15ba7be..7b35ebf 100644
--- a/src/Reflex/Host/Basic.hs
+++ b/src/Reflex/Host/Basic.hs
@@ -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 @@ Maintainer : dave.laing.80@gmail.com
* '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 @@ For some usage examples, see
{-# 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 Data.Traversable (for)
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 @@ type BasicGuestConstraints t (m :: * -> *) =
, 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 @@ basicHostForever guest = basicHostWithQuit $ never <$ guest
-- | 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.
--