on develop help sign in
Add PrimMonad instance for SpiderHost
commit39d9392b191ec85052eb8839f6c9f207f9e21885 authorRyan Trinkle <ryan.trinkle@gmail.com> dateTue 7 Aug 2018, 13:28 (8 years ago) parentabb0fd9
1 file changed+4
src/Reflex/Spider/Internal.hs+4
src/Reflex/Spider/Internal.hs+4
@@ -2555,6 +2555,10 @@ instance Monad (SpiderHost x) where
25552555 {-# INLINABLE fail #-}
25562556 fail s = SpiderHost $ fail s
25572557
2558+instance PrimMonad (SpiderHost x) where
2559+ type PrimState (SpiderHost x) = PrimState IO
2560+ primitive = SpiderHost . primitive
2561+
25582562-- | Run an action affecting the global Spider timeline; this will be guarded by
25592563-- a mutex for that timeline
25602564runSpiderHost :: SpiderHost Global a -> IO a