Merge branch 'develop' into extra-query-instances

This commit is contained in:
John Ericson 2019-12-12 19:08:24 -05:00 committed by GitHub
commit 3dbe56c014
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 58 additions and 64 deletions

View File

@ -5,9 +5,14 @@
* Data.WeakBag.traverse and Data.FastWeakBag.traverse have been
renamed to Data.WeakBag.traverse_ and Data.FastWeakBag.traverse_
respectively.
* Fixes a bug in `Reflex.Patch.MapWithMove.patchThatSortsMapWith` that was producing invalid `PatchMapWithMove`.
* Additional instances for `Group` and `Query` classes for basic types.
* Add missing `NotReady` instances:
- `instance NotReady (SpiderTimeline x) (SpiderHost x)`
- `instance HasSpiderTimeline x => NotReady (SpiderTimeline x) (PerformEventT (SpiderTimeline x) (SpiderHost x))`
## 0.6.2.4
* Update to monoidal-containers 0.6
@ -19,7 +24,9 @@
## 0.6.2.2
* Support these >= 1. Add `split-these` flag to control whether to use new these/semialign combination or not.
* Update version bounds to fix some CI failures
* Add travis CI configuration
## 0.6.2.1
@ -45,21 +52,31 @@
* Fix `holdDyn` so that it is lazy in its event argument
These produce `DMap`s whose values needn't be `Identity`.
* Stop using the now-deprecated `*Tag` classes (e.g., `ShowTag`).
* Fix `holdDyn` so that it is lazy in its event argument.
## 0.6.1.0
* Re-export all of `Data.Map.Monoidal`
* Fix `QueryT` and `RequesterT` tests
## 0.6.0.0 -- 2019-03-20
* Deprecate `FunctorMaybe` in favor of `Data.Witherable.Filterable`. We still export `fmapMaybe`, `ffilter`, etc., but they all rely on `Filterable` now.
* Rename `MonadDynamicWriter` to `DynamicWriter` and add a deprecation for the old name.
* Remove many deprecated functions.
* Add a `Num` instance for `Dynamic`.
* Add `matchRequestsWithResponses` to make it easier to use `Requester` with protocols that don't do this matching for you.
* Add `withRequesterT` to map functions over the request and response of a `RequesterT`.
* Suppress nil patches in `QueryT` as an optimization. The `Query` type must now have an `Eq` instance.
* Add `throttleBatchWithLag` to `Reflex.Time`. See that module for details.

View File

@ -1,49 +0,0 @@
{ mkDerivation, ghc, base, bifunctors, containers, deepseq
, dependent-map, dependent-sum, exception-transformers
, haskell-src-exts, haskell-src-meta, hlint, lens, MemoTrie
, monad-control, mtl, primitive, random, ref-tf
, semigroupoids , semigroups, split, stdenv, stm, syb
, template-haskell , these, time, transformers
, transformers-compat, unbounded-delays, prim-uniq
, data-default, filepath, directory, filemanip, ghcjs-base
, monoidal-containers, witherable, profunctors
, splitThese ? (semialign != null), semialign ? null, these-lens ? null
, useTemplateHaskell ? true
}:
mkDerivation {
pname = "reflex";
version = "0.6.2.4";
src = builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [
"default.nix"
"release.nix"
".git"
"dist"
])) ./.;
libraryHaskellDepends = [
base bifunctors containers dependent-map dependent-sum
exception-transformers lens
MemoTrie monad-control mtl primitive ref-tf semigroupoids
semigroups stm syb template-haskell these transformers
transformers-compat prim-uniq
base bifunctors containers deepseq dependent-map dependent-sum
mtl ref-tf split transformers data-default
random time unbounded-delays monoidal-containers witherable
profunctors
] ++ (if ghc.isGhcjs or false then [
ghcjs-base
] else []) ++ (if !useTemplateHaskell then [] else [
haskell-src-exts haskell-src-meta
]) ++ (if splitThese then [
semialign
these-lens
] else []);
testHaskellDepends = if ghc.isGhcjs or false then [] else [
hlint filepath directory filemanip
];
configureFlags =
stdenv.lib.optional (!useTemplateHaskell) [ "-f-use-template-haskell" ] ++
stdenv.lib.optional (!splitThese) [ "-f-split-these" ];
homepage = "https://github.com/reflex-frp/reflex";
description = "Higher-order Functional Reactive Programming";
license = stdenv.lib.licenses.bsd3;
}

View File

@ -1,7 +1,7 @@
{
"owner": "reflex-frp",
"repo": "reflex-platform",
"branch": "jailbreakTheselens",
"rev": "4284ed527c96c373538dc7e31776d9a50ca6aa91",
"sha256": "1m1nkxq7ng9wnqbd77xn8d81f2iz8g61y5m0r3gp0gi0q59jm8ay"
"branch": "develop",
"rev": "e7b76dd552a10916c7d8702c11292dac4f4299ea",
"sha256": "0s1183arrwldcs50qhzgnv94v24n9bgq6dfq64wp0a3q2nzyvgwh"
}

View File

@ -17,19 +17,36 @@ let
] ++ lib.optionals (reflex-platform.iosSupport) [
"ghcIosAarch64"
];
hsPkgs = lib.genAttrs compilers (ghc: let
ghc' = reflex-platform.${ghc}.override {
overrides = self: super: {
reflex-dontUseTemplateHaskell = self.callPackage ./. { useTemplateHaskell = false; };
reflex = self.callPackage ./. { useTemplateHaskell = true; };
variations = map (v: "reflex" + v) [
"-dontUseTemplateHaskell"
""
];
compilerPkgs = lib.genAttrs compilers (ghc: let
variationPkgs = lib.genAttrs variations (variation: let
reflex-platform = reflex-platform-fun {
inherit system;
__useTemplateHaskell = variation == "reflex"; # TODO hack
haskellOverlays = [
# Use this package's source for reflex
(self: super: {
_dep = super._dep // {
reflex = builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [
"release.nix"
".git"
"dist"
])) ./.;
};
})
];
};
};
in {
inherit (ghc') reflex reflex-dontUseTemplateHaskell;
in reflex-platform.${ghc}.reflex);
in variationPkgs // {
cache = reflex-platform.pinBuildInputs "reflex-${system}-${ghc}"
(builtins.attrValues variationPkgs);
});
in hsPkgs // {
in compilerPkgs // {
cache = reflex-platform.pinBuildInputs "reflex-${system}"
(lib.concatLists (map builtins.attrValues (builtins.attrValues hsPkgs)));
(map (a: a.cache) (builtins.attrValues compilerPkgs));
});
metaCache = native-reflex-platform.pinBuildInputs "reflex-everywhere"

View File

@ -20,7 +20,7 @@ import Reflex.NotReady.Class
import Reflex.PostBuild.Class
-- | A 'Dynamic' "network": Takes a 'Dynamic' of network-creating actions and replaces the network whenever the 'Dynamic' updates.
-- The returned Event of network results fires when the 'Dynamic' updates.
-- The returned Event of network results fires at post-build time and when the 'Dynamic' updates.
-- Note: Often, the type 'a' is an Event, in which case the return value is an Event-of-Events, where the outer 'Event' fires
-- when switching networks. Such an 'Event' would typically be flattened (via 'switchPromptly').
networkView :: (NotReady t m, Adjustable t m, PostBuild t m) => Dynamic t (m a) -> m (Event t a)

View File

@ -103,6 +103,7 @@ import qualified Reflex.Host.Class
import Reflex.NotReady.Class
import Reflex.Patch
import qualified Reflex.Patch.DMapWithMove as PatchDMapWithMove
import Reflex.PerformEvent.Base (PerformEventT)
#ifdef DEBUG_TRACE_EVENTS
import qualified Data.ByteString.Char8 as BS8
@ -2705,3 +2706,11 @@ instance MonadAtomicRef (SpiderHostFrame x) where
instance PrimMonad (SpiderHostFrame x) where
type PrimState (SpiderHostFrame x) = PrimState IO
primitive = SpiderHostFrame . EventM . primitive
instance NotReady (SpiderTimeline x) (SpiderHost x) where
notReadyUntil _ = return ()
notReady = return ()
instance HasSpiderTimeline x => NotReady (SpiderTimeline x) (PerformEventT (SpiderTimeline x) (SpiderHost x)) where
notReadyUntil _ = return ()
notReady = return ()

View File

@ -34,7 +34,7 @@ workflow w0 = do
rec eResult <- networkHold (unWorkflow w0) $ fmap unWorkflow $ switch $ snd <$> current eResult
return $ fmap fst eResult
-- | Similar to 'workflow', but outputs an 'Event' that fires whenever the current 'Workflow' is replaced by the next 'Workflow'.
-- | Similar to 'workflow', but outputs an 'Event' that fires at post-build time and whenever the current 'Workflow' is replaced by the next 'Workflow'.
workflowView :: forall t m a. (Reflex t, NotReady t m, Adjustable t m, MonadFix m, MonadHold t m, PostBuild t m) => Workflow t m a -> m (Event t a)
workflowView w0 = do
rec eResult <- networkView . fmap unWorkflow =<< holdDyn w0 eReplace