on develop help sign in
Merge branch 'develop' into bump-reflex-platform-for-tests
88fdcefJohn Ericson
.travis.yml+3−1
@@ -29,6 +29,8 @@ matrix:
29 include:
29 include:
30 - compiler: ghcjs-8.4
30 - compiler: ghcjs-8.4
31 addons: {"apt":{"sources":["hvr-ghc"],"packages":["cabal-install-3.0"]}}
31 addons: {"apt":{"sources":["hvr-ghc"],"packages":["cabal-install-3.0"]}}
32+ - compiler: ghc-8.8.1
33+ addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.8.1","cabal-install-3.0"]}}
32 - compiler: ghc-8.6.5
34 - compiler: ghc-8.6.5
33 addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-2.4"]}}
35 addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-2.4"]}}
34 - compiler: ghc-8.4.4
36 - compiler: ghc-8.4.4
@@ -163,7 +165,7 @@ script:
163 # Constraint set no-th
165 # Constraint set no-th
164 - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='reflex -use-template-haskell' all | color_cabal_output
166 - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='reflex -use-template-haskell' all | color_cabal_output
165 # Constraint set old-these
167 # Constraint set old-these
166− - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='these <1' all | color_cabal_output
168+ - if $GHCJS || ! $GHCJS && [ $HCNUMVER -lt 80800 ] ; then ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='these <1' all | color_cabal_output ; fi
167 # Constraint set old-witherable
169 # Constraint set old-witherable
168 - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='witherable <0.3.2' all | color_cabal_output
170 - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='witherable <0.3.2' all | color_cabal_output
169
171
cabal.haskell-ci+1
@@ -10,6 +10,7 @@ constraint-set no-th
10 constraints: reflex -use-template-haskell
10 constraints: reflex -use-template-haskell
11
11
12constraint-set old-these
12constraint-set old-these
13+ ghc: <8.8
13 constraints: these <1
14 constraints: these <1
14
15
15constraint-set old-witherable
16constraint-set old-witherable
reflex.cabal+6−6
@@ -18,7 +18,7 @@ extra-source-files:
18 ChangeLog.md
18 ChangeLog.md
19
19
20tested-with:
20tested-with:
21− GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5,
21+ GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.1,
22 GHCJS ==8.4
22 GHCJS ==8.4
23
23
24flag use-reflex-optimizer
24flag use-reflex-optimizer
@@ -50,7 +50,7 @@ library
50 hs-source-dirs: src
50 hs-source-dirs: src
51 build-depends:
51 build-depends:
52 MemoTrie == 0.6.*,
52 MemoTrie == 0.6.*,
53− base >= 4.9 && < 4.13,
53+ base >= 4.9 && < 4.14,
54 bifunctors >= 5.2 && < 5.6,
54 bifunctors >= 5.2 && < 5.6,
55 comonad >= 5.0.4 && < 5.1,
55 comonad >= 5.0.4 && < 5.1,
56 constraints-extras >= 0.3 && < 0.4,
56 constraints-extras >= 0.3 && < 0.4,
@@ -63,14 +63,14 @@ library
63 mtl >= 2.1 && < 2.3,
63 mtl >= 2.1 && < 2.3,
64 prim-uniq >= 0.1.0.1 && < 0.2,
64 prim-uniq >= 0.1.0.1 && < 0.2,
65 primitive >= 0.5 && < 0.8,
65 primitive >= 0.5 && < 0.8,
66− profunctors >= 5.3 && < 5.5,
66+ profunctors >= 5.3 && < 5.6,
67 random == 1.1.*,
67 random == 1.1.*,
68 ref-tf == 0.4.*,
68 ref-tf == 0.4.*,
69 reflection == 2.1.*,
69 reflection == 2.1.*,
70 semigroupoids >= 4.0 && < 6,
70 semigroupoids >= 4.0 && < 6,
71 stm >= 2.4 && < 2.6,
71 stm >= 2.4 && < 2.6,
72 syb >= 0.5 && < 0.8,
72 syb >= 0.5 && < 0.8,
73− time >= 1.4 && < 1.9,
73+ time >= 1.4 && < 1.10,
74 transformers >= 0.5.6.0 && < 0.6,
74 transformers >= 0.5.6.0 && < 0.6,
75 unbounded-delays >= 0.1.0.0 && < 0.2,
75 unbounded-delays >= 0.1.0.0 && < 0.2,
76 witherable >= 0.3 && < 0.3.2
76 witherable >= 0.3 && < 0.3.2
@@ -150,9 +150,9 @@ library
150 cpp-options: -DUSE_TEMPLATE_HASKELL
150 cpp-options: -DUSE_TEMPLATE_HASKELL
151 build-depends:
151 build-depends:
152 dependent-sum >= 0.6 && < 0.7,
152 dependent-sum >= 0.6 && < 0.7,
153− haskell-src-exts >= 1.16 && < 1.22,
153+ haskell-src-exts >= 1.16 && < 1.23,
154 haskell-src-meta >= 0.6 && < 0.9,
154 haskell-src-meta >= 0.6 && < 0.9,
155− template-haskell >= 2.9 && < 2.15
155+ template-haskell >= 2.9 && < 2.16
156 exposed-modules:
156 exposed-modules:
157 Reflex.Dynamic.TH
157 Reflex.Dynamic.TH
158 other-extensions: TemplateHaskell
158 other-extensions: TemplateHaskell
src/Data/Functor/Misc.hs+1
@@ -53,6 +53,7 @@ import Data.Map (Map)
53import qualified Data.Map as Map
53import qualified Data.Map as Map
54import Data.Some (Some(Some))
54import Data.Some (Some(Some))
55import Data.These
55import Data.These
56+import Data.Type.Equality ((:~:)(Refl))
56import Data.Typeable hiding (Refl)
57import Data.Typeable hiding (Refl)
57
58
58--------------------------------------------------------------------------------
59--------------------------------------------------------------------------------
src/Reflex/Class.hs+4−1
@@ -200,7 +200,7 @@ import Data.Dependent.Map (DMap, DSum (..))
200import qualified Data.Dependent.Map as DMap
200import qualified Data.Dependent.Map as DMap
201import Data.Functor.Compose
201import Data.Functor.Compose
202import Data.Functor.Product
202import Data.Functor.Product
203−import Data.GADT.Compare (GEq (..), GCompare (..), (:~:) (..))
203+import Data.GADT.Compare (GEq (..), GCompare (..))
204import Data.FastMutableIntMap (PatchIntMap)
204import Data.FastMutableIntMap (PatchIntMap)
205import Data.Foldable
205import Data.Foldable
206import Data.Functor.Bind
206import Data.Functor.Bind
@@ -215,6 +215,7 @@ import Data.Some (Some(Some))
215import Data.String
215import Data.String
216import Data.These
216import Data.These
217import Data.Type.Coercion
217import Data.Type.Coercion
218+import Data.Type.Equality ((:~:) (..))
218import Data.Witherable (Filterable(..))
219import Data.Witherable (Filterable(..))
219import qualified Data.Witherable as W
220import qualified Data.Witherable as W
220import Reflex.FunctorMaybe (FunctorMaybe)
221import Reflex.FunctorMaybe (FunctorMaybe)
@@ -663,7 +664,9 @@ instance Reflex t => Monad (Behavior t) where
663 a >>= f = pull $ sample a >>= sample . f
664 a >>= f = pull $ sample a >>= sample . f
664 -- Note: it is tempting to write (_ >> b = b); however, this would result in (fail x >> return y) succeeding (returning y), which violates the law that (a >> b = a >>= \_ -> b), since the implementation of (>>=) above actually will fail. Since we can't examine 'Behavior's other than by using sample, I don't think it's possible to write (>>) to be more efficient than the (>>=) above.
665 -- Note: it is tempting to write (_ >> b = b); however, this would result in (fail x >> return y) succeeding (returning y), which violates the law that (a >> b = a >>= \_ -> b), since the implementation of (>>=) above actually will fail. Since we can't examine 'Behavior's other than by using sample, I don't think it's possible to write (>>) to be more efficient than the (>>=) above.
665 return = constant
666 return = constant
667+#if !MIN_VERSION_base(4,13,0)
666 fail = error "Monad (Behavior t) does not support fail"
668 fail = error "Monad (Behavior t) does not support fail"
669+#endif
667
670
668instance (Reflex t, Monoid a) => Monoid (Behavior t a) where
671instance (Reflex t, Monoid a) => Monoid (Behavior t a) where
669 mempty = constant mempty
672 mempty = constant mempty
src/Reflex/Dynamic.hs+2−1
@@ -87,11 +87,12 @@ import Data.Align
87import Data.Dependent.Map (DMap)
87import Data.Dependent.Map (DMap)
88import qualified Data.Dependent.Map as DMap
88import qualified Data.Dependent.Map as DMap
89import Data.Dependent.Sum (DSum (..))
89import Data.Dependent.Sum (DSum (..))
90−import Data.GADT.Compare ((:~:) (..), GCompare (..), GEq (..), GOrdering (..))
90+import Data.GADT.Compare (GCompare (..), GEq (..), GOrdering (..))
91import Data.Map (Map)
91import Data.Map (Map)
92import Data.Maybe
92import Data.Maybe
93import Data.Monoid ((<>))
93import Data.Monoid ((<>))
94import Data.These
94import Data.These
95+import Data.Type.Equality ((:~:) (..))
95
96
96import Debug.Trace
97import Debug.Trace
97
98
src/Reflex/Spider/Internal.hs+16−1
@@ -43,6 +43,8 @@ import Control.Monad.Reader.Class
43import Control.Monad.IO.Class
43import Control.Monad.IO.Class
44import Control.Monad.ReaderIO
44import Control.Monad.ReaderIO
45import Control.Monad.Ref
45import Control.Monad.Ref
46+import Control.Monad.Fail (MonadFail)
47+import qualified Control.Monad.Fail as MonadFail
46import Data.Align
48import Data.Align
47import Data.Coerce
49import Data.Coerce
48import Data.Dependent.Map (DMap, DSum (..))
50import Data.Dependent.Map (DMap, DSum (..))
@@ -63,6 +65,7 @@ import Data.Monoid ((<>))
63import Data.Proxy
65import Data.Proxy
64import Data.These
66import Data.These
65import Data.Traversable
67import Data.Traversable
68+import Data.Type.Equality ((:~:)(Refl))
66import Data.Witherable (Filterable, mapMaybe)
69import Data.Witherable (Filterable, mapMaybe)
67import GHC.Exts
70import GHC.Exts
68import GHC.IORef (IORef (..))
71import GHC.IORef (IORef (..))
@@ -972,8 +975,10 @@ instance Monad (BehaviorM x) where
972 BehaviorM x >> BehaviorM y = BehaviorM $ x >> y
975 BehaviorM x >> BehaviorM y = BehaviorM $ x >> y
973 {-# INLINE return #-}
976 {-# INLINE return #-}
974 return x = BehaviorM $ return x
977 return x = BehaviorM $ return x
978+#if !MIN_VERSION_base(4,13,0)
975 {-# INLINE fail #-}
979 {-# INLINE fail #-}
976 fail s = BehaviorM $ fail s
980 fail s = BehaviorM $ fail s
981+#endif
977
982
978data BehaviorSubscribed x a
983data BehaviorSubscribed x a
979 = forall p. BehaviorSubscribedHold (Hold x p)
984 = forall p. BehaviorSubscribedHold (Hold x p)
@@ -2357,8 +2362,10 @@ instance HasSpiderTimeline x => Monad (Reflex.Class.Dynamic (SpiderTimeline x))
2357 x >>= f = SpiderDynamic $ dynamicDynIdentity $ newJoinDyn $ newMapDyn (unSpiderDynamic . f) $ unSpiderDynamic x
2362 x >>= f = SpiderDynamic $ dynamicDynIdentity $ newJoinDyn $ newMapDyn (unSpiderDynamic . f) $ unSpiderDynamic x
2358 {-# INLINE (>>) #-}
2363 {-# INLINE (>>) #-}
2359 (>>) = (*>)
2364 (>>) = (*>)
2365+#if !MIN_VERSION_base(4,13,0)
2360 {-# INLINE fail #-}
2366 {-# INLINE fail #-}
2361 fail _ = error "Dynamic does not support 'fail'"
2367 fail _ = error "Dynamic does not support 'fail'"
2368+#endif
2362
2369
2363{-# INLINABLE newJoinDyn #-}
2370{-# INLINABLE newJoinDyn #-}
2364newJoinDyn :: HasSpiderTimeline x => DynamicS x (Identity (DynamicS x (Identity a))) -> Reflex.Spider.Internal.Dyn x (Identity a)
2371newJoinDyn :: HasSpiderTimeline x => DynamicS x (Identity (DynamicS x (Identity a))) -> Reflex.Spider.Internal.Dyn x (Identity a)
@@ -2637,8 +2644,14 @@ instance Monad (SpiderHost x) where
2637 SpiderHost x >> SpiderHost y = SpiderHost $ x >> y
2644 SpiderHost x >> SpiderHost y = SpiderHost $ x >> y
2638 {-# INLINABLE return #-}
2645 {-# INLINABLE return #-}
2639 return x = SpiderHost $ return x
2646 return x = SpiderHost $ return x
2647+#if !MIN_VERSION_base(4,13,0)
2648+ {-# INLINABLE fail #-}
2649+ fail = MonadFail.fail
2650+#endif
2651+
2652+instance MonadFail (SpiderHost x) where
2640 {-# INLINABLE fail #-}
2653 {-# INLINABLE fail #-}
2641− fail s = SpiderHost $ fail s
2654+ fail s = SpiderHost $ MonadFail.fail s
2642
2655
2643-- | Run an action affecting the global Spider timeline; this will be guarded by
2656-- | Run an action affecting the global Spider timeline; this will be guarded by
2644-- a mutex for that timeline
2657-- a mutex for that timeline
@@ -2660,8 +2673,10 @@ instance Monad (SpiderHostFrame x) where
2660 SpiderHostFrame x >> SpiderHostFrame y = SpiderHostFrame $ x >> y
2673 SpiderHostFrame x >> SpiderHostFrame y = SpiderHostFrame $ x >> y
2661 {-# INLINABLE return #-}
2674 {-# INLINABLE return #-}
2662 return x = SpiderHostFrame $ return x
2675 return x = SpiderHostFrame $ return x
2676+#if !MIN_VERSION_base(4,13,0)
2663 {-# INLINABLE fail #-}
2677 {-# INLINABLE fail #-}
2664 fail s = SpiderHostFrame $ fail s
2678 fail s = SpiderHostFrame $ fail s
2679+#endif
2665
2680
2666instance NotReady (SpiderTimeline x) (SpiderHostFrame x) where
2681instance NotReady (SpiderTimeline x) (SpiderHostFrame x) where
2667 notReadyUntil _ = pure ()
2682 notReadyUntil _ = pure ()