| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Taskwarrior.Task
Description
This Module exports the main datatype of this library: Task. It is provided with FromJSON and ToJSON instances.
Synopsis
- data Task = Task {
- status :: Status
- recurringChild :: Maybe RecurringChild
- uuid :: UUID
- id :: Maybe Integer
- entry :: UTCTime
- description :: Text
- start :: Maybe UTCTime
- modified :: Maybe UTCTime
- due :: Maybe UTCTime
- until :: Maybe UTCTime
- annotations :: Set Annotation
- scheduled :: Maybe UTCTime
- project :: Maybe Text
- priority :: Maybe Priority
- depends :: Set UUID
- tags :: Set Tag
- urgency :: Double
- uda :: UDA
- type Tag = Text
- makeTask :: UUID -> UTCTime -> Text -> Task
Documentation
A Task represents a task from taskwarrior.
The specification demands, that the existence of some fields is dependent on the status of the task.
Those fields are therefore bundled in Status as a sum-type.
All fields in an imported task which are not part of the specification will be put in the UDA (user defined attributes) HashMap.
Since the json can have multiple semantically equivalent representations of a task first serializing and then deserializing is not identity. But deserializing and then serializing should be. (Thus making serializing and deserializing idempotent.)
Constructors
| Task | |
Fields
| |
A Tag can be basically any string. But beware: Special symbols work but might clash with task cli syntax. As an example you can use a space in a . But then you cannot use Tagtask +my tag on the command line.
makeTask :: UUID -> UTCTime -> Text -> Task Source #
Makes a Task with the given mandatory fields uuid, entry time and description. See createTask for a non-pure version which needs less parameters.
Adherence to specification
This library uses the taskwarrior specification for the JSON serialisation format. But it deviates in a small number of ways to be more pragmatic.