Skip to content

Commit 88fdcef

Browse files
authored
Merge branch 'develop' into bump-reflex-platform-for-tests
2 parents d5a44ab + db8eb1a commit 88fdcef

File tree

7 files changed

+33
-10
lines changed

7 files changed

+33
-10
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ matrix:
2929
include:
3030
- compiler: ghcjs-8.4
3131
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"]}}
3234
- compiler: ghc-8.6.5
3335
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-2.4"]}}
3436
- compiler: ghc-8.4.4
@@ -163,7 +165,7 @@ script:
163165
# Constraint set no-th
164166
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='reflex -use-template-haskell' all | color_cabal_output
165167
# 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
167169
# Constraint set old-witherable
168170
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='witherable <0.3.2' all | color_cabal_output
169171

cabal.haskell-ci

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ constraint-set no-th
1010
constraints: reflex -use-template-haskell
1111

1212
constraint-set old-these
13+
ghc: <8.8
1314
constraints: these <1
1415

1516
constraint-set old-witherable

reflex.cabal

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ extra-source-files:
1818
ChangeLog.md
1919

2020
tested-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,
2222
GHCJS ==8.4
2323

2424
flag use-reflex-optimizer
@@ -50,7 +50,7 @@ library
5050
hs-source-dirs: src
5151
build-depends:
5252
MemoTrie == 0.6.*,
53-
base >= 4.9 && < 4.13,
53+
base >= 4.9 && < 4.14,
5454
bifunctors >= 5.2 && < 5.6,
5555
comonad >= 5.0.4 && < 5.1,
5656
constraints-extras >= 0.3 && < 0.4,
@@ -63,14 +63,14 @@ library
6363
mtl >= 2.1 && < 2.3,
6464
prim-uniq >= 0.1.0.1 && < 0.2,
6565
primitive >= 0.5 && < 0.8,
66-
profunctors >= 5.3 && < 5.5,
66+
profunctors >= 5.3 && < 5.6,
6767
random == 1.1.*,
6868
ref-tf == 0.4.*,
6969
reflection == 2.1.*,
7070
semigroupoids >= 4.0 && < 6,
7171
stm >= 2.4 && < 2.6,
7272
syb >= 0.5 && < 0.8,
73-
time >= 1.4 && < 1.9,
73+
time >= 1.4 && < 1.10,
7474
transformers >= 0.5.6.0 && < 0.6,
7575
unbounded-delays >= 0.1.0.0 && < 0.2,
7676
witherable >= 0.3 && < 0.3.2
@@ -150,9 +150,9 @@ library
150150
cpp-options: -DUSE_TEMPLATE_HASKELL
151151
build-depends:
152152
dependent-sum >= 0.6 && < 0.7,
153-
haskell-src-exts >= 1.16 && < 1.22,
153+
haskell-src-exts >= 1.16 && < 1.23,
154154
haskell-src-meta >= 0.6 && < 0.9,
155-
template-haskell >= 2.9 && < 2.15
155+
template-haskell >= 2.9 && < 2.16
156156
exposed-modules:
157157
Reflex.Dynamic.TH
158158
other-extensions: TemplateHaskell

src/Data/Functor/Misc.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ import Data.Map (Map)
5353
import qualified Data.Map as Map
5454
import Data.Some (Some(Some))
5555
import Data.These
56+
import Data.Type.Equality ((:~:)(Refl))
5657
import Data.Typeable hiding (Refl)
5758

5859
--------------------------------------------------------------------------------

src/Reflex/Class.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ import Data.Dependent.Map (DMap, DSum (..))
200200
import qualified Data.Dependent.Map as DMap
201201
import Data.Functor.Compose
202202
import Data.Functor.Product
203-
import Data.GADT.Compare (GEq (..), GCompare (..), (:~:) (..))
203+
import Data.GADT.Compare (GEq (..), GCompare (..))
204204
import Data.FastMutableIntMap (PatchIntMap)
205205
import Data.Foldable
206206
import Data.Functor.Bind
@@ -215,6 +215,7 @@ import Data.Some (Some(Some))
215215
import Data.String
216216
import Data.These
217217
import Data.Type.Coercion
218+
import Data.Type.Equality ((:~:) (..))
218219
import Data.Witherable (Filterable(..))
219220
import qualified Data.Witherable as W
220221
import Reflex.FunctorMaybe (FunctorMaybe)
@@ -663,7 +664,9 @@ instance Reflex t => Monad (Behavior t) where
663664
a >>= f = pull $ sample a >>= sample . f
664665
-- 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.
665666
return = constant
667+
#if !MIN_VERSION_base(4,13,0)
666668
fail = error "Monad (Behavior t) does not support fail"
669+
#endif
667670

668671
instance (Reflex t, Monoid a) => Monoid (Behavior t a) where
669672
mempty = constant mempty

src/Reflex/Dynamic.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,12 @@ import Data.Align
8787
import Data.Dependent.Map (DMap)
8888
import qualified Data.Dependent.Map as DMap
8989
import Data.Dependent.Sum (DSum (..))
90-
import Data.GADT.Compare ((:~:) (..), GCompare (..), GEq (..), GOrdering (..))
90+
import Data.GADT.Compare (GCompare (..), GEq (..), GOrdering (..))
9191
import Data.Map (Map)
9292
import Data.Maybe
9393
import Data.Monoid ((<>))
9494
import Data.These
95+
import Data.Type.Equality ((:~:) (..))
9596

9697
import Debug.Trace
9798

src/Reflex/Spider/Internal.hs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ import Control.Monad.Reader.Class
4343
import Control.Monad.IO.Class
4444
import Control.Monad.ReaderIO
4545
import Control.Monad.Ref
46+
import Control.Monad.Fail (MonadFail)
47+
import qualified Control.Monad.Fail as MonadFail
4648
import Data.Align
4749
import Data.Coerce
4850
import Data.Dependent.Map (DMap, DSum (..))
@@ -63,6 +65,7 @@ import Data.Monoid ((<>))
6365
import Data.Proxy
6466
import Data.These
6567
import Data.Traversable
68+
import Data.Type.Equality ((:~:)(Refl))
6669
import Data.Witherable (Filterable, mapMaybe)
6770
import GHC.Exts
6871
import GHC.IORef (IORef (..))
@@ -972,8 +975,10 @@ instance Monad (BehaviorM x) where
972975
BehaviorM x >> BehaviorM y = BehaviorM $ x >> y
973976
{-# INLINE return #-}
974977
return x = BehaviorM $ return x
978+
#if !MIN_VERSION_base(4,13,0)
975979
{-# INLINE fail #-}
976980
fail s = BehaviorM $ fail s
981+
#endif
977982

978983
data BehaviorSubscribed x a
979984
= forall p. BehaviorSubscribedHold (Hold x p)
@@ -2357,8 +2362,10 @@ instance HasSpiderTimeline x => Monad (Reflex.Class.Dynamic (SpiderTimeline x))
23572362
x >>= f = SpiderDynamic $ dynamicDynIdentity $ newJoinDyn $ newMapDyn (unSpiderDynamic . f) $ unSpiderDynamic x
23582363
{-# INLINE (>>) #-}
23592364
(>>) = (*>)
2365+
#if !MIN_VERSION_base(4,13,0)
23602366
{-# INLINE fail #-}
23612367
fail _ = error "Dynamic does not support 'fail'"
2368+
#endif
23622369

23632370
{-# INLINABLE newJoinDyn #-}
23642371
newJoinDyn :: 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
26372644
SpiderHost x >> SpiderHost y = SpiderHost $ x >> y
26382645
{-# INLINABLE return #-}
26392646
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
26402653
{-# INLINABLE fail #-}
2641-
fail s = SpiderHost $ fail s
2654+
fail s = SpiderHost $ MonadFail.fail s
26422655

26432656
-- | Run an action affecting the global Spider timeline; this will be guarded by
26442657
-- a mutex for that timeline
@@ -2660,8 +2673,10 @@ instance Monad (SpiderHostFrame x) where
26602673
SpiderHostFrame x >> SpiderHostFrame y = SpiderHostFrame $ x >> y
26612674
{-# INLINABLE return #-}
26622675
return x = SpiderHostFrame $ return x
2676+
#if !MIN_VERSION_base(4,13,0)
26632677
{-# INLINABLE fail #-}
26642678
fail s = SpiderHostFrame $ fail s
2679+
#endif
26652680

26662681
instance NotReady (SpiderTimeline x) (SpiderHostFrame x) where
26672682
notReadyUntil _ = pure ()

0 commit comments

Comments
 (0)