on master help sign in
Move overlapping instances out of TaggedTrans
commita40e519b795844ab7af2ecc6398bf8a45855f02c authorVladislav Zavialov <vlad.z.4096@gmail.com> dateFri 28 Apr 2017, 12:24 (9 years ago) parentd24e51a
2 files changed+9−9
src/Ether/TagDispatch.hs+4−4 src/Ether/TaggedTrans.hs+5−5
src/Ether/TagDispatch.hs+4−4
@@ -65,7 +65,7 @@ tagAttach :: forall tag m a . TagAttachT tag m a -> m a
6565tagAttach = coerce (runIdentityT @_ @m @a)
6666{-# INLINE tagAttach #-}
6767
68−instance
68+instance {-# OVERLAPPING #-}
6969 ( MonadReader tag r m, trans ~ IdentityT
7070 ) => Mtl.MonadReader r (TaggedTrans (TAG_ATTACH tag) trans m)
7171 where
@@ -79,7 +79,7 @@ instance
7979 reader = reader @tag
8080 {-# INLINE reader #-}
8181
82−instance
82+instance {-# OVERLAPPING #-}
8383 ( MonadState tag s m, trans ~ IdentityT
8484 ) => Mtl.MonadState s (TaggedTrans (TAG_ATTACH tag) trans m)
8585 where
@@ -93,7 +93,7 @@ instance
9393 state = state @tag
9494 {-# INLINE state #-}
9595
96−instance
96+instance {-# OVERLAPPING #-}
9797 ( MonadExcept tag e m, trans ~ IdentityT
9898 ) => Mtl.MonadError e (TaggedTrans (TAG_ATTACH tag) trans m)
9999 where
@@ -104,7 +104,7 @@ instance
104104 catchError = catch @tag
105105 {-# INLINE catchError #-}
106106
107−instance
107+instance {-# OVERLAPPING #-}
108108 ( MonadWriter tag w m, trans ~ IdentityT
109109 ) => Mtl.MonadWriter w (TaggedTrans (TAG_ATTACH tag) trans m)
110110 where
src/Ether/TaggedTrans.hs+5−5
@@ -132,7 +132,7 @@ instance Lift.LiftCallCC trans => Lift.LiftCallCC (TaggedTrans tag trans) where
132132
133133-- Instances for mtl classes
134134
135−instance {-# OVERLAPPABLE #-}
135+instance
136136 ( Mtl.MonadCont m
137137 , Lift.LiftCallCC trans
138138 , Monad (trans m)
@@ -140,7 +140,7 @@ instance {-# OVERLAPPABLE #-}
140140 where
141141 callCC = Lift.liftCallCC' Mtl.callCC
142142
143−instance {-# OVERLAPPABLE #-}
143+instance
144144 ( Mtl.MonadReader r m
145145 , Lift.LiftLocal trans
146146 , Monad (trans m)
@@ -150,7 +150,7 @@ instance {-# OVERLAPPABLE #-}
150150 local = Lift.liftLocal Mtl.ask Mtl.local
151151 reader = lift . Mtl.reader
152152
153−instance {-# OVERLAPPABLE #-}
153+instance
154154 ( Mtl.MonadState s m
155155 , MonadTrans trans
156156 , Monad (trans m)
@@ -160,7 +160,7 @@ instance {-# OVERLAPPABLE #-}
160160 put = lift . Mtl.put
161161 state = lift . Mtl.state
162162
163−instance {-# OVERLAPPABLE #-}
163+instance
164164 ( Mtl.MonadWriter w m
165165 , Lift.LiftListen trans
166166 , Lift.LiftPass trans
@@ -172,7 +172,7 @@ instance {-# OVERLAPPABLE #-}
172172 listen = Lift.liftListen Mtl.listen
173173 pass = Lift.liftPass Mtl.pass
174174
175−instance {-# OVERLAPPABLE #-}
175+instance
176176 ( Mtl.MonadError e m
177177 , Lift.LiftCatch trans
178178 , Monad (trans m)