Reorganize
This commit is contained in:
parent
36e90895f0
commit
15c547fe5e
9 changed files with 343 additions and 166 deletions
|
|
@ -21,6 +21,8 @@ module TaskMachine.Task
|
|||
, Description
|
||||
, Snippet(..)
|
||||
-- * Misc stuff
|
||||
, emptyTask
|
||||
, newTask
|
||||
, compareTasks
|
||||
-- * Formatting
|
||||
, formatTask
|
||||
|
|
@ -313,6 +315,13 @@ pTasks = many pTask <* eof
|
|||
|
||||
{- Misc stuff -}
|
||||
|
||||
emptyTask :: Task
|
||||
emptyTask = Task Incomplete Nothing Nothing Nothing []
|
||||
|
||||
-- | Create a new task with empty description and the given date as creation date
|
||||
newTask :: Day -> Task
|
||||
newTask day = Task Incomplete Nothing Nothing (Just day) []
|
||||
|
||||
compareTasks :: Task -> Task -> Ordering
|
||||
compareTasks a b = mconcat
|
||||
[ compare (taskCompletion a) (taskCompletion b)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue