on master help sign in
Move an unsafeCoerce to a better place
commit1b31d0baf10476eaefc8fec115ef0a12a775a9c3 authorHarendra Kumar <harendra.kumar@gmail.com> dateMon 26 Jun 2017, 15:24 (9 years ago) parent3251739
1 file changed+2−2
src/Strands/Context.hs+2−2
src/Strands/Context.hs+2−2
@@ -188,7 +188,7 @@ composeContext :: (MonadIO m, MonadPlus m) => Context -> m a
188188composeContext Context { currentm = m
189189 , fstack = fs
190190 } =
191− unsafeCoerce m >>= composefStack (unsafeCoerce fs)
191+ unsafeCoerce m >>= composefStack fs
192192
193193 where
194194
@@ -201,7 +201,7 @@ composeContext Context { currentm = m
201201
202202 -- composefStack :: Monad m => [a -> AsyncT m a] -> a -> AsyncT m b
203203 composefStack [] _ = error "Bug: this should never be reached"
204− composefStack (f:ff) x = f x >>= composefStack ff
204+ composefStack (f:ff) x = (unsafeCoerce f) x >>= composefStack ff
205205
206206setContextMailBox :: Context -> a -> Context
207207setContextMailBox ctx mbdata = ctx { mailBox = Just $ unsafeCoerce mbdata }