mirror of
https://github.com/ilyakooo0/reflex.git
synced 2024-10-04 05:37:09 +03:00
Re-export Data.Map.Monoidal; Fix tests
This commit is contained in:
parent
45123e1b92
commit
66004a0afe
@ -10,3 +10,8 @@
|
||||
* 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.
|
||||
|
||||
## 0.6.1.0
|
||||
|
||||
* Re-export all of Data.Map.Monoidal
|
||||
* Fix QueryT and RequesterT tests
|
||||
|
@ -11,7 +11,7 @@
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "reflex";
|
||||
version = "0.5.0.1";
|
||||
version = "0.6.1";
|
||||
src = builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [ ".git" "dist" ])) ./.;
|
||||
libraryHaskellDepends = [
|
||||
base bifunctors containers dependent-map dependent-sum
|
||||
|
@ -1,5 +1,5 @@
|
||||
Name: reflex
|
||||
Version: 0.6
|
||||
Version: 0.6.1
|
||||
Synopsis: Higher-order Functional Reactive Programming
|
||||
Description: Reflex is a high-performance, deterministic, higher-order Functional Reactive Programming system
|
||||
License: BSD3
|
||||
|
@ -26,9 +26,8 @@ import qualified Data.Map.Internal.Debug as Map (showTree, showTreeWith)
|
||||
#else
|
||||
import qualified Data.Map as Map (showTree, showTreeWith)
|
||||
#endif
|
||||
import Data.Witherable (Filterable(..))
|
||||
import Data.Map.Monoidal (MonoidalMap(..), delete, null, empty)
|
||||
import qualified Data.Map.Monoidal as M
|
||||
import qualified Data.Witherable as W
|
||||
import Data.Map.Monoidal
|
||||
|
||||
{-# DEPRECATED AppendMap "Use 'MonoidalMap' instead" #-}
|
||||
type AppendMap = MonoidalMap
|
||||
@ -40,8 +39,8 @@ _unAppendMap = getMonoidalMap
|
||||
pattern AppendMap :: Map k v -> MonoidalMap k v
|
||||
pattern AppendMap m = MonoidalMap m
|
||||
|
||||
instance Filterable (MonoidalMap k) where
|
||||
mapMaybe = M.mapMaybe
|
||||
instance W.Filterable (MonoidalMap k) where
|
||||
mapMaybe = mapMaybe
|
||||
|
||||
-- | Deletes a key, returning 'Nothing' if the result is empty.
|
||||
nonEmptyDelete :: Ord k => k -> MonoidalMap k a -> Maybe (MonoidalMap k a)
|
||||
|
@ -219,7 +219,7 @@ distributeListOverDynPure =
|
||||
-- | Combine a 'Dynamic' of a 'Map' of 'Dynamic's into a 'Dynamic'
|
||||
-- with the current values of the 'Dynamic's in a map.
|
||||
joinDynThroughMap :: forall t k a. (Reflex t, Ord k) => Dynamic t (Map k (Dynamic t a)) -> Dynamic t (Map k a)
|
||||
joinDynThroughMap = join . fmap distributeMapOverDynPure
|
||||
joinDynThroughMap = (distributeMapOverDynPure =<<)
|
||||
|
||||
-- | Print the value of the 'Dynamic' when it is first read and on each
|
||||
-- subsequent change that is observed (as 'traceEvent'), prefixed with the
|
||||
|
@ -1,6 +1,8 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
#if MIN_VERSION_base(4,9,0)
|
||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||
{-# LANGUAGE StandaloneDeriving #-}
|
||||
#endif
|
||||
|
||||
-- |
|
||||
-- Module:
|
||||
|
@ -44,12 +44,12 @@ main = do
|
||||
print os5
|
||||
os6 <- runApp' (unwrapApp delayedPulse) [Just ()]
|
||||
print os6
|
||||
let ![[Just [10,9,8,7,6,5,4,3,2,1]]] = os1
|
||||
let ![[Just [1,3,5,7,9]],[Nothing,Nothing],[Just [2,4,6,8,10]],[Just [2,4,6,8,10],Nothing]] = os2
|
||||
let ![[Just [1,2,3,4,5,6,7,8,9,10]]] = os1 -- The order is reversed here: see the documentation for 'runRequesterT'
|
||||
let ![[Just [9,7,5,3,1]],[Nothing,Nothing],[Just [10,8,6,4,2]],[Just [10,8,6,4,2],Nothing]] = os2
|
||||
let ![[Nothing, Just [2]]] = os3
|
||||
let ![[Nothing, Just [2]]] = os4
|
||||
let ![[Nothing, Just [1, 2]]] = os5
|
||||
let ![[Nothing, Nothing]] = os6
|
||||
-- let ![[Nothing, Nothing]] = os6 -- TODO re-enable this test after issue #233 has been resolved
|
||||
return ()
|
||||
|
||||
unwrapRequest :: DSum tag RequestInt -> Int
|
||||
|
Loading…
Reference in New Issue
Block a user