@@ -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
2558+instance PrimMonad (SpiderHost x) where
2559+ type PrimState (SpiderHost x) = PrimState IO
2560+ primitive = SpiderHost . primitive
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