Skip to content

Commit 8a9789c

Browse files
committed
Fixes for ghc 8.8.1
1 parent 2610452 commit 8a9789c

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

reflex.cabal

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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/Reflex/Class.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,6 @@ instance Reflex t => Monad (Behavior t) where
663663
a >>= f = pull $ sample a >>= sample . f
664664
-- 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.
665665
return = constant
666-
fail = error "Monad (Behavior t) does not support fail"
667666

668667
instance (Reflex t, Monoid a) => Monoid (Behavior t a) where
669668
mempty = constant mempty

src/Reflex/Spider/Internal.hs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,8 +972,10 @@ instance Monad (BehaviorM x) where
972972
BehaviorM x >> BehaviorM y = BehaviorM $ x >> y
973973
{-# INLINE return #-}
974974
return x = BehaviorM $ return x
975+
#if !MIN_VERSION_base(4,13,0)
975976
{-# INLINE fail #-}
976977
fail s = BehaviorM $ fail s
978+
#endif
977979

978980
data BehaviorSubscribed x a
979981
= forall p. BehaviorSubscribedHold (Hold x p)
@@ -2357,8 +2359,10 @@ instance HasSpiderTimeline x => Monad (Reflex.Class.Dynamic (SpiderTimeline x))
23572359
x >>= f = SpiderDynamic $ dynamicDynIdentity $ newJoinDyn $ newMapDyn (unSpiderDynamic . f) $ unSpiderDynamic x
23582360
{-# INLINE (>>) #-}
23592361
(>>) = (*>)
2362+
#if !MIN_VERSION_base(4,13,0)
23602363
{-# INLINE fail #-}
23612364
fail _ = error "Dynamic does not support 'fail'"
2365+
#endif
23622366

23632367
{-# INLINABLE newJoinDyn #-}
23642368
newJoinDyn :: HasSpiderTimeline x => DynamicS x (Identity (DynamicS x (Identity a))) -> Reflex.Spider.Internal.Dyn x (Identity a)
@@ -2637,6 +2641,10 @@ instance Monad (SpiderHost x) where
26372641
SpiderHost x >> SpiderHost y = SpiderHost $ x >> y
26382642
{-# INLINABLE return #-}
26392643
return x = SpiderHost $ return x
2644+
#if MIN_VERSION_base(4,13,0)
2645+
2646+
instance MonadFail (SpiderHost x) where
2647+
#endif
26402648
{-# INLINABLE fail #-}
26412649
fail s = SpiderHost $ fail s
26422650

@@ -2660,8 +2668,10 @@ instance Monad (SpiderHostFrame x) where
26602668
SpiderHostFrame x >> SpiderHostFrame y = SpiderHostFrame $ x >> y
26612669
{-# INLINABLE return #-}
26622670
return x = SpiderHostFrame $ return x
2671+
#if !MIN_VERSION_base(4,13,0)
26632672
{-# INLINABLE fail #-}
26642673
fail s = SpiderHostFrame $ fail s
2674+
#endif
26652675

26662676
instance NotReady (SpiderTimeline x) (SpiderHostFrame x) where
26672677
notReadyUntil _ = pure ()

0 commit comments

Comments
 (0)