on develop help sign in
Add PrimMonad instance for SpiderHost
39d9392Ryan Trinkle
src/Reflex/Spider/Internal.hs+4
@@ -2555,6 +2555,10 @@ instance Monad (SpiderHost x) where
2555 {-# INLINABLE fail #-}
2555 {-# INLINABLE fail #-}
2556 fail s = SpiderHost $ fail s
2556 fail s = SpiderHost $ fail s
2557
2557
2558+instance PrimMonad (SpiderHost x) where
2559+ type PrimState (SpiderHost x) = PrimState IO
2560+ primitive = SpiderHost . primitive
2561+
2558-- | Run an action affecting the global Spider timeline; this will be guarded by
2562-- | Run an action affecting the global Spider timeline; this will be guarded by
2559-- a mutex for that timeline
2563-- a mutex for that timeline
2560runSpiderHost :: SpiderHost Global a -> IO a
2564runSpiderHost :: SpiderHost Global a -> IO a