Begin UI restructure

This commit is contained in:
Joscha 2018-09-27 16:41:43 +00:00
parent 5de27b195b
commit d8e0e1a867
5 changed files with 112 additions and 31 deletions

View file

@ -14,6 +14,7 @@ module TaskMachine.LTask
, toTask
, fromTasks
, toTasks
, modifyLTask
, sortLTasks
, loadLTasks
, saveLTasks
@ -47,6 +48,9 @@ fromTasks = zipWith LTask (map Old [1..])
toTasks :: [LTask] -> [Task]
toTasks = map toTask . sortLTasks
modifyLTask :: (Task -> Task) -> LTask -> LTask
modifyLTask f (LTask pos task) = LTask pos (f task)
sortLTasks :: [LTask] -> [LTask]
sortLTasks = sortBy (compare `on` lPosition)