Commit f5674347 authored by Camil Staps's avatar Camil Staps 🚀 Committed by Haye Böhm

Adapt to removal of splitWith from platform

parent fc8b18f5
......@@ -657,7 +657,7 @@ toggleDoor roomNo=:(floorIdx, c2d) exit
where
newLocks :: !Dir ![Dir] -> [Dir]
newLocks dir locks
#! (lockedDirs, rest) = splitWith (\l -> l === dir) locks
#! (lockedDirs, rest) = partition (\l -> l === dir) locks
| isEmpty lockedDirs = [dir : rest]
| otherwise = rest
......@@ -672,7 +672,7 @@ toggleHop fromRoom toRoom
where
newLocks :: !Coord3D ![Coord3D] -> [Coord3D]
newLocks c3d locks
#! (lockedDirs, rest) = splitWith (\l -> l === c3d) locks
#! (lockedDirs, rest) = partition (\l -> l === c3d) locks
| isEmpty lockedDirs = [c3d : rest]
| otherwise = rest
......
......@@ -41,7 +41,7 @@ dbUpdateItem new
dbDeleteItem :: !(DBRef a) -> Task (Maybe a) | iTask, DB a
dbDeleteItem itemid
= get databaseId >>= \items ->
let (match, nomatch) = splitWith (\i -> getItemId i == itemid) items in
let (match, nomatch) = partition (\i -> getItemId i == itemid) items in
dbWriteAll nomatch >>| case match of
[] = return Nothing
[item:_] = return (Just item)
......
......@@ -115,7 +115,7 @@ where
}
apply ui=:(UI t attr cs)
# (actions, others) = splitWith (\s->s=:(UI UIAction _ _)) cs
# (actions, others) = partition (\s->s=:(UI UIAction _ _)) cs
= (ReplaceUI (UI t attr (mkmenu actions ++ others)), LSType ui)
adjust (NoChange,s) = (NoChange,s)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment