on develop help sign in
Only include MonadFail where needed
51b6399Hamish Mackenzie
src/Reflex/Spider/Internal.hs+4−12
@@ -976,13 +976,9 @@ instance Monad (BehaviorM x) where
976 return x = BehaviorM $ return x
976 return x = BehaviorM $ return x
977#if !MIN_VERSION_base(4,13,0)
977#if !MIN_VERSION_base(4,13,0)
978 {-# INLINE fail #-}
978 {-# INLINE fail #-}
979− fail s = MonadFail.fail
979+ fail s = BehaviorM $ fail s
980#endif
980#endif
981
981
982−instance MonadFail (BehaviorM x) where
983− {-# INLINABLE fail #-}
984− fail s = BehaviorM $ MonadFail.fail s
985−
986data BehaviorSubscribed x a
982data BehaviorSubscribed x a
987 = forall p. BehaviorSubscribedHold (Hold x p)
983 = forall p. BehaviorSubscribedHold (Hold x p)
988 | BehaviorSubscribedPull (PullSubscribed x a)
984 | BehaviorSubscribedPull (PullSubscribed x a)
@@ -2649,7 +2645,7 @@ instance Monad (SpiderHost x) where
2649 return x = SpiderHost $ return x
2645 return x = SpiderHost $ return x
2650#if !MIN_VERSION_base(4,13,0)
2646#if !MIN_VERSION_base(4,13,0)
2651 {-# INLINABLE fail #-}
2647 {-# INLINABLE fail #-}
2652− fail s = MonadFail.fail
2648+ fail = MonadFail.fail
2653#endif
2649#endif
2654
2650
2655instance MonadFail (SpiderHost x) where
2651instance MonadFail (SpiderHost x) where
@@ -2678,13 +2674,9 @@ instance Monad (SpiderHostFrame x) where
2678 return x = SpiderHostFrame $ return x
2674 return x = SpiderHostFrame $ return x
2679#if !MIN_VERSION_base(4,13,0)
2675#if !MIN_VERSION_base(4,13,0)
2680 {-# INLINABLE fail #-}
2676 {-# INLINABLE fail #-}
2681− fail s = MonadFail.fail
2677+ fail s = SpiderHostFrame $ fail s
2682#endif
2678#endif
2683
2679
2684−instance MonadFail (SpiderHostFrame x) where
2685− {-# INLINABLE fail #-}
2686− fail s = SpiderHostFrame $ MonadFail.fail s
2687−
2688instance NotReady (SpiderTimeline x) (SpiderHostFrame x) where
2680instance NotReady (SpiderTimeline x) (SpiderHostFrame x) where
2689 notReadyUntil _ = pure ()
2681 notReadyUntil _ = pure ()
2690 notReady = pure ()
2682 notReady = pure ()
@@ -2735,4 +2727,4 @@ instance NotReady (SpiderTimeline x) (SpiderHost x) where
2735
2727
2736instance HasSpiderTimeline x => NotReady (SpiderTimeline x) (PerformEventT (SpiderTimeline x) (SpiderHost x)) where
2728instance HasSpiderTimeline x => NotReady (SpiderTimeline x) (PerformEventT (SpiderTimeline x) (SpiderHost x)) where
2737 notReadyUntil _ = return ()
2729 notReadyUntil _ = return ()
2738− notReady = return ()
2730+ notReady = return ()