Skip to content

Commit 51b6399

Browse files
committed
Only include MonadFail where needed
1 parent 8f460ca commit 51b6399

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

src/Reflex/Spider/Internal.hs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -976,13 +976,9 @@ instance Monad (BehaviorM x) where
976976
return x = BehaviorM $ return x
977977
#if !MIN_VERSION_base(4,13,0)
978978
{-# INLINE fail #-}
979-
fail s = MonadFail.fail
979+
fail s = BehaviorM $ fail s
980980
#endif
981981

982-
instance MonadFail (BehaviorM x) where
983-
{-# INLINABLE fail #-}
984-
fail s = BehaviorM $ MonadFail.fail s
985-
986982
data BehaviorSubscribed x a
987983
= forall p. BehaviorSubscribedHold (Hold x p)
988984
| BehaviorSubscribedPull (PullSubscribed x a)
@@ -2649,7 +2645,7 @@ instance Monad (SpiderHost x) where
26492645
return x = SpiderHost $ return x
26502646
#if !MIN_VERSION_base(4,13,0)
26512647
{-# INLINABLE fail #-}
2652-
fail s = MonadFail.fail
2648+
fail = MonadFail.fail
26532649
#endif
26542650

26552651
instance MonadFail (SpiderHost x) where
@@ -2678,13 +2674,9 @@ instance Monad (SpiderHostFrame x) where
26782674
return x = SpiderHostFrame $ return x
26792675
#if !MIN_VERSION_base(4,13,0)
26802676
{-# INLINABLE fail #-}
2681-
fail s = MonadFail.fail
2677+
fail s = SpiderHostFrame $ fail s
26822678
#endif
26832679

2684-
instance MonadFail (SpiderHostFrame x) where
2685-
{-# INLINABLE fail #-}
2686-
fail s = SpiderHostFrame $ MonadFail.fail s
2687-
26882680
instance NotReady (SpiderTimeline x) (SpiderHostFrame x) where
26892681
notReadyUntil _ = pure ()
26902682
notReady = pure ()
@@ -2735,4 +2727,4 @@ instance NotReady (SpiderTimeline x) (SpiderHost x) where
27352727

27362728
instance HasSpiderTimeline x => NotReady (SpiderTimeline x) (PerformEventT (SpiderTimeline x) (SpiderHost x)) where
27372729
notReadyUntil _ = return ()
2738-
notReady = return ()
2730+
notReady = return ()

0 commit comments

Comments
 (0)