File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -206,11 +206,11 @@ data Migrated a = Migrated MigrationStats a | AlreadyMigrated a
206
206
deriving (Functor )
207
207
208
208
instance Applicative Migrated where
209
- pure = return
209
+ pure = AlreadyMigrated
210
210
f <*> x = do f' <- f ; x' <- x ; return $ f' x'
211
211
212
212
instance Monad Migrated where
213
- return = AlreadyMigrated
213
+ return = pure
214
214
AlreadyMigrated a >>= f = f a
215
215
Migrated stats a >>= f =
216
216
case f a of
Original file line number Diff line number Diff line change @@ -251,7 +251,7 @@ data Restore a = RestoreDone a
251
251
| RestoreFindBlob BlobId (Bool -> Restore a )
252
252
253
253
instance Monad Restore where
254
- return = RestoreDone
254
+ return = pure
255
255
RestoreDone x >>= g = g x
256
256
RestoreFail err >>= _ = RestoreFail err
257
257
RestoreAddBlob bs f >>= g = RestoreAddBlob bs $ \ bid -> f bid >>= g
@@ -270,7 +270,7 @@ instance Functor Restore where
270
270
fmap = liftM
271
271
272
272
instance Applicative Restore where
273
- pure = return
273
+ pure = RestoreDone
274
274
mf <*> mx = do f <- mf ; x <- mx ; return (f x)
275
275
276
276
runRestore :: BlobStores -> Restore a -> IO (Either String a )
You can’t perform that action at this time.
0 commit comments