@@ -103,22 +103,27 @@ newtype DispatchT dp m a = DispatchT (Trans.IdentityT m a)
103-- | Type-restricted 'coerce'.
103-- | Type-restricted 'coerce'.
104pack :: forall dp m a . Trans.IdentityT m a -> DispatchT dp m a
104pack :: forall dp m a . Trans.IdentityT m a -> DispatchT dp m a
105pack = coerce
105pack = coerce
107-- | Type-restricted 'coerce'.
108-- | Type-restricted 'coerce'.
108unpack :: forall dp m a . DispatchT dp m a -> Trans.IdentityT m a
109unpack :: forall dp m a . DispatchT dp m a -> Trans.IdentityT m a
109unpack = coerce
110unpack = coerce
111+{-# INLINE unpack #-}
111-- | Type-restricted 'coerce'.
113-- | Type-restricted 'coerce'.
112dispatchT :: forall dp m a . m a -> DispatchT dp m a
114dispatchT :: forall dp m a . m a -> DispatchT dp m a
113dispatchT = coerce
115dispatchT = coerce
116+{-# INLINE dispatchT #-}
115-- | Type-restricted 'coerce'.
118-- | Type-restricted 'coerce'.
116runDispatchT :: forall dp m a . DispatchT dp m a -> m a
119runDispatchT :: forall dp m a . DispatchT dp m a -> m a
117runDispatchT = coerce
120runDispatchT = coerce
121+{-# INLINE runDispatchT #-}
119-- | Type-restricted 'coerce'.
123-- | Type-restricted 'coerce'.
120redispatch :: forall dp dp' m a . DispatchT dp m a -> DispatchT dp' m a
124redispatch :: forall dp dp' m a . DispatchT dp m a -> DispatchT dp' m a
121redispatch = coerce
125redispatch = coerce
126+{-# INLINE redispatch #-}
123instance MB.MonadBase b m => MB.MonadBase b (DispatchT dp m) where
128instance MB.MonadBase b m => MB.MonadBase b (DispatchT dp m) where
124 liftBase = MB.liftBaseDefault
129 liftBase = MB.liftBaseDefault
@@ -206,7 +211,7 @@ type DispatchTagAttachT t = DispatchT (TagAttach t)
207-- | Attach a tag to untagged transformers.
212-- | Attach a tag to untagged transformers.
208tagAttach :: forall tag m a . DispatchTagAttachT tag m a -> m a
213tagAttach :: forall tag m a . DispatchTagAttachT tag m a -> m a
209−tagAttach = coerce
214+tagAttach = runDispatchT
211instance MonadReader tag r m
216instance MonadReader tag r m
212 => Class.MonadReader r (DispatchTagAttachT tag m) where
217 => Class.MonadReader r (DispatchTagAttachT tag m) where
@@ -240,7 +245,7 @@ type DispatchTagReplaceT tOld tNew = DispatchT (TagReplace tOld tNew)
241-- | Replace a tag with another tag.
246-- | Replace a tag with another tag.
242tagReplace :: forall tOld tNew m a . DispatchTagReplaceT tOld tNew m a -> m a
247tagReplace :: forall tOld tNew m a . DispatchTagReplaceT tOld tNew m a -> m a
243−tagReplace = coerce
248+tagReplace = runDispatchT
245instance MonadReader tNew r m
250instance MonadReader tNew r m
246 => MonadReader tOld r (DispatchTagReplaceT tOld tNew m) where
251 => MonadReader tOld r (DispatchTagReplaceT tOld tNew m) where