taskwarrior-0.6.0.0: Types and aeson instances for taskwarrior tasks
Safe HaskellNone
LanguageHaskell2010

Taskwarrior.Task

Description

This Module exports the main datatype of this library: Task. It is provided with FromJSON and ToJSON instances.

Synopsis

Documentation

data Task Source #

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) 'Data.Map.Strict.Map Data.Text.Text'.

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.)

Instances

Instances details
Eq Task Source # 
Instance details

Defined in Taskwarrior.Task

Methods

(==) :: Task -> Task -> Bool #

(/=) :: Task -> Task -> Bool #

Read Task Source # 
Instance details

Defined in Taskwarrior.Task

Show Task Source # 
Instance details

Defined in Taskwarrior.Task

Methods

showsPrec :: Int -> Task -> ShowS #

show :: Task -> String #

showList :: [Task] -> ShowS #

FromJSON Task Source # 
Instance details

Defined in Taskwarrior.Task

Methods

parseJSON :: Value -> Parser Task

parseJSONList :: Value -> Parser [Task]

ToJSON Task Source # 
Instance details

Defined in Taskwarrior.Task

Methods

toJSON :: Task -> Value

toEncoding :: Task -> Encoding

toJSONList :: [Task] -> Value

toEncodingList :: [Task] -> Encoding

type Tag = Text Source #

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 Tag. But then you cannot use task +my tag on the command line.

makeTask :: UUID -> UTCTime -> Text -> Task Source #

Makes a fresh Task with the given mandatory fields uuid, entry time and description. See createTask for a non-pure version which needs less parameters.