Work on debugging

This commit is contained in:
2023-04-27 11:35:48 +01:00
parent 35990c53bf
commit 9972e0fdea
17 changed files with 39 additions and 28 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ writeSaveSlot ss u = do
readSaveSlot :: SaveSlot -> IO (Universe -> Maybe Universe)
readSaveSlot ss = do
fExists <- doesFileExist $ saveSlotPath ss
when (not fExists) $ error "Tried to read non-existant save file"
unless fExists $ error "Tried to read non-existant save file"
mcw <- decodeFileStrict $ saveSlotPath ss
flip (maybe (error "Tried to read incorrectly encoded save file")) mcw $ \cw ->
return $ \uv -> Just