Begin UI restructure
This commit is contained in:
parent
5de27b195b
commit
d8e0e1a867
5 changed files with 112 additions and 31 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue