on develop help sign in
Merge branch 'develop' into cn-add-missing-bounds-to-cabal-file
commit4357e6112317d7ba637dacb4791ae7f76f4694df authorElliot Cameron <3noch@users.noreply.github.com> dateTue 5 May 2020, 13:32 (6 years ago) parent92b5475316c3cd
4 files changed+13−9
reflex.cabal+1−1 release.nix+2−2 src/Reflex/Class.hs+7−1 src/Reflex/Host/Headless.hs+3−5
reflex.cabal+1−1
@@ -246,7 +246,7 @@ test-suite hlint
246246 , directory
247247 , filepath
248248 , filemanip
249− , hlint < 2.1 || >= 2.2.2
249+ , hlint (< 2.1 || >= 2.2.2) && < 3
250250 if impl(ghcjs)
251251 buildable: False
252252
release.nix+2−2
@@ -1,12 +1,12 @@
11{ reflex-platform-fun ? import ./dep/reflex-platform
2+, supportedSystems ? ["x86_64-linux" "x86_64-darwin"]
23}:
34
45let
56 native-reflex-platform = reflex-platform-fun {};
67 inherit (native-reflex-platform.nixpkgs) lib;
7− systems = ["x86_64-linux" "x86_64-darwin"];
88
9− perPlatform = lib.genAttrs systems (system: let
9+ perPlatform = lib.genAttrs supportedSystems (system: let
1010 reflex-platform = reflex-platform-fun { inherit system; };
1111 compilers = [
1212 "ghc"
src/Reflex/Class.hs+7−1
@@ -180,7 +180,7 @@ import Prelude hiding (zip, zipWith)
180180import Data.These.Combinators (justThese)
181181#endif
182182#if MIN_VERSION_semialign(1,1,0)
183−import Data.Zip (Zip (..))
183+import Data.Zip (Zip (..), Unzip (..))
184184#endif
185185#endif
186186
@@ -1091,6 +1091,12 @@ instance Reflex t => Zip (Event t) where
10911091 zip x y = mapMaybe justThese $ align x y
10921092#endif
10931093
1094+#ifdef MIN_VERSION_semialign
1095+#if MIN_VERSION_semialign(1,1,0)
1096+instance Reflex t => Unzip (Event t) where
1097+ unzip = splitE
1098+#endif
1099+#endif
10941100
10951101-- | Create a new 'Event' that only occurs if the supplied 'Event' occurs and
10961102-- the 'Behavior' is true at the time of occurrence.
src/Reflex/Host/Headless.hs+3−5
@@ -43,7 +43,7 @@ type MonadHeadlessApp t m =
4343-- | Run a headless FRP network. Inside the action, you will most probably use
4444-- the capabilities provided by the 'TriggerEvent' and 'PerformEvent' type
4545-- classes to interface the FRP network with the outside world. Useful for
46−-- testing.
46+-- testing. Each headless network runs on its own spider timeline.
4747runHeadlessApp
4848 :: (forall t m. MonadHeadlessApp t m => m (Event t ()))
4949 -- ^ The action to be run in the headless FRP network. The FRP network is
@@ -51,10 +51,8 @@ runHeadlessApp
5151 -> IO ()
5252runHeadlessApp guest =
5353 -- We are using the 'Spider' implementation of reflex. Running the host
54− -- allows us to take actions on the FRP timeline. The scoped type signature
55− -- specifies that our host runs on the Global timeline.
56− -- For more information, see 'Reflex.Spider.Internal.runSpiderHost'.
57− (runSpiderHost :: SpiderHost Global a -> IO a) $ do
54+ -- allows us to take actions on the FRP timeline.
55+ withSpiderTimeline $ runSpiderHostForTimeline $ do
5856 -- Create the "post-build" event and associated trigger. This event fires
5957 -- once, when the application starts.
6058 (postBuild, postBuildTriggerRef) <- newEventWithTriggerRef