Merge pull request #11 from fused-effects/we-want-the-functor

Adjust IORef carrier to handle new handleCoercible idiom.
main
Patrick Thomson 2019-11-07 16:06:42 -05:00 committed by GitHub
commit 8d3d9c9eaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -3,4 +3,4 @@ packages: .
source-repository-package source-repository-package
type: git type: git
location: https://github.com/fused-effects/fused-effects.git location: https://github.com/fused-effects/fused-effects.git
tag: 0c7d9c19b638f7fe21ac77903894308ad15b0e80 tag: e6282afa5eee744ccf733a1adecbd1db218e4d01

View File

@ -68,5 +68,5 @@ instance (MonadIO m, Algebra sig m, Effect sig) => Algebra (State s :+: sig) (St
case act of case act of
Put s k -> liftIO (writeIORef ref s) *> k Put s k -> liftIO (writeIORef ref s) *> k
Get k -> liftIO (readIORef ref) >>= k Get k -> liftIO (readIORef ref) >>= k
alg (R other) = StateC (handleCoercible other) alg (R other) = StateC (alg (R (handleCoercible other)))
{-# INLINE alg #-} {-# INLINE alg #-}