This repository was archived by the owner on Aug 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,12 @@ module IC.Purify where
7
7
8
8
import Control.Monad.ST
9
9
import Data.Functor
10
+ import Data.Kind (Type )
10
11
import Data.Either
11
12
import Data.Bifunctor
12
13
13
14
class SnapshotAble i where
14
- type SnapshotOf i :: *
15
+ type SnapshotOf i :: Type
15
16
persist :: i s -> ST s (SnapshotOf i )
16
17
recreate :: SnapshotOf i -> ST s (i s )
17
18
Original file line number Diff line number Diff line change @@ -44,7 +44,6 @@ import Numeric.Natural
44
44
import Data.Char
45
45
import Test.Tasty.HUnit
46
46
import Test.Tasty.Options
47
- import Control.Monad.Trans
48
47
import Control.Monad.Except
49
48
import Control.Concurrent
50
49
import Control.Exception (catch )
@@ -128,7 +127,7 @@ connect :: String -> Int -> IO ReplWrapper
128
127
connect ep tp = do
129
128
agentConfig <- makeAgentConfig ep tp
130
129
let ? agentConfig = agentConfig
131
- return (R id )
130
+ return (R $ \ x -> x )
132
131
133
132
-- Yes, implicit arguments are frowned upon. But they are also very useful.
134
133
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import qualified Data.IntMap as IM
27
27
import qualified Data.Map.Lazy as M
28
28
import qualified Data.Vector as V
29
29
import Data.ByteString.Lazy (ByteString )
30
+ import Data.Kind (Type )
30
31
31
32
import qualified IC.Canister.StableMemory as Stable
32
33
@@ -56,8 +57,8 @@ resumeMemory :: W.MemoryInst (ST s) -> ByteString -> ST s ()
56
57
resumeMemory i p = resume i p
57
58
58
59
class Monad (M a ) => Persistable a where
59
- type Persisted a :: *
60
- type M a :: * -> *
60
+ type Persisted a :: Type
61
+ type M a :: Type -> Type
61
62
persist :: a -> M a (Persisted a )
62
63
resume :: a -> Persisted a -> M a ()
63
64
You can’t perform that action at this time.
0 commit comments