-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Types and aeson instances for taskwarrior tasks
--
-- Types and aeson instances for the https://taskwarrior.org task
-- import/export feature
@package taskwarrior
@version 0.1.0.0
-- | The Mask module models the state a recurring parent saves about it‘s
-- child tasks.
module Taskwarrior.Mask
-- | The mask is a newtype to provide Aeson instances from and to a JSON
-- string.
newtype Mask
Mask :: [MaskState] -> Mask
[mask] :: Mask -> [MaskState]
-- | Represents the state of a child in a recurring task.
data MaskState
instance GHC.Show.Show Taskwarrior.Mask.Mask
instance GHC.Classes.Ord Taskwarrior.Mask.Mask
instance GHC.Read.Read Taskwarrior.Mask.Mask
instance GHC.Classes.Eq Taskwarrior.Mask.Mask
instance GHC.Enum.Bounded Taskwarrior.Mask.MaskState
instance GHC.Classes.Ord Taskwarrior.Mask.MaskState
instance GHC.Read.Read Taskwarrior.Mask.MaskState
instance GHC.Enum.Enum Taskwarrior.Mask.MaskState
instance GHC.Show.Show Taskwarrior.Mask.MaskState
instance GHC.Classes.Eq Taskwarrior.Mask.MaskState
instance Data.Aeson.Types.FromJSON.FromJSON Taskwarrior.Mask.Mask
instance Data.Aeson.Types.ToJSON.ToJSON Taskwarrior.Mask.Mask
-- | This module provides the type for the priority of a task.
module Taskwarrior.Priority
-- | Parses a JSON string to a Maybe Priority, fails on anything else.
parseMay :: Value -> Parser (Maybe Priority)
-- | A task can have the priorities high, medium, low or none, which is
-- modeled via a Maybe Priority.
data Priority
instance GHC.Enum.Bounded Taskwarrior.Priority.Priority
instance GHC.Classes.Ord Taskwarrior.Priority.Priority
instance GHC.Enum.Enum Taskwarrior.Priority.Priority
instance GHC.Read.Read Taskwarrior.Priority.Priority
instance GHC.Show.Show Taskwarrior.Priority.Priority
instance GHC.Classes.Eq Taskwarrior.Priority.Priority
instance Data.Aeson.Types.ToJSON.ToJSON Taskwarrior.Priority.Priority
-- | This module provides no own time type for taskwarrior rather it only
-- gives deserialisation and serialisation support.
module Taskwarrior.Time
-- | Parses a JSON string from the taskwarrior time format.
parse :: Value -> Parser UTCTime
-- | Converts a time to the taskwarrior time format.
toValue :: UTCTime -> Value
-- | This module deals with information of a task which is dependent on the
-- status.
module Taskwarrior.Status
-- | A task can be pending, deleted, completed, waiting or recurring. If I
-- task is a recurring child or a recurring parent depends on the
-- existence of the corresponding fields and can not be told from the
-- status field alone. It is recommended to access the fields only by
-- pattern matching since the getters are partial.
data Status
Pending :: Status
Deleted :: UTCTime -> Status
[end] :: Status -> UTCTime
Completed :: UTCTime -> Status
[end] :: Status -> UTCTime
Waiting :: UTCTime -> Status
[wait] :: Status -> UTCTime
RecurringParent :: Text -> Mask -> Status
[recur] :: Status -> Text
[mask] :: Status -> Mask
RecurringChild :: Text -> Integer -> UUID -> Status
[recur] :: Status -> Text
[imask] :: Status -> Integer
[parent] :: Status -> UUID
-- | Takes all information that is dependent on the status from a JSON
-- object.
parseFromObject :: Object -> Parser Status
-- | A list of Pairs can be used to construct a JSON object later. The
-- result of Status.toPairs is supposed to be combined with the rest of
-- the fields of a task.
toPairs :: Status -> [Pair]
instance GHC.Classes.Ord Taskwarrior.Status.Status
instance GHC.Read.Read Taskwarrior.Status.Status
instance GHC.Show.Show Taskwarrior.Status.Status
instance GHC.Classes.Eq Taskwarrior.Status.Status
module Taskwarrior.Annotation
data Annotation
Annotation :: UTCTime -> Text -> Annotation
[entry] :: Annotation -> UTCTime
[description] :: Annotation -> Text
instance GHC.Classes.Ord Taskwarrior.Annotation.Annotation
instance GHC.Read.Read Taskwarrior.Annotation.Annotation
instance GHC.Show.Show Taskwarrior.Annotation.Annotation
instance GHC.Classes.Eq Taskwarrior.Annotation.Annotation
instance Data.Aeson.Types.FromJSON.FromJSON Taskwarrior.Annotation.Annotation
instance Data.Aeson.Types.ToJSON.ToJSON Taskwarrior.Annotation.Annotation
-- | User defined attributes are stored in a HashMap from Text to json
-- Values because we have no type information about them.
module Taskwarrior.UDA
-- | A field will in practice only be a number or a string.
type UDA = HashMap Text Value
-- | This Module exports the main datatype of this library: Task. It is
-- provided with FromJSON and ToJSON instances.
module Taskwarrior.Task
-- | A Task represents a task from taskwarrior. See
-- https://taskwarrior.org/docs/design/task.html for the
-- specification of the fields. 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.)
data Task
Task :: Status -> UUID -> UTCTime -> Text -> Maybe UTCTime -> Maybe UTCTime -> Maybe UTCTime -> Maybe UTCTime -> [Annotation] -> Maybe UTCTime -> Maybe Text -> Maybe Priority -> [UUID] -> [Tag] -> UDA -> Task
[status] :: Task -> Status
[uuid] :: Task -> UUID
[entry] :: Task -> UTCTime
[description] :: Task -> Text
[start] :: Task -> Maybe UTCTime
[modified] :: Task -> Maybe UTCTime
[due] :: Task -> Maybe UTCTime
[until] :: Task -> Maybe UTCTime
[annotations] :: Task -> [Annotation]
[scheduled] :: Task -> Maybe UTCTime
[project] :: Task -> Maybe Text
[priority] :: Task -> Maybe Priority
[depends] :: Task -> [UUID]
[tags] :: Task -> [Tag]
[uda] :: Task -> UDA
-- | A Tag can be basically any string. But beware: Special symbols work
-- but might clash with task cli syntax.
type Tag = Text
instance GHC.Read.Read Taskwarrior.Task.Task
instance GHC.Show.Show Taskwarrior.Task.Task
instance GHC.Classes.Eq Taskwarrior.Task.Task
instance Data.Aeson.Types.FromJSON.FromJSON Taskwarrior.Task.Task
instance Data.Aeson.Types.ToJSON.ToJSON Taskwarrior.Task.Task
-- | This modules contains IO actions to interact with the taskwarrior
-- application. The taskwarrior documentation very explicitly disallows
-- accessing the files by itself. So all functions here work via calling
-- the task binary which needs to be in the PATH.
module Taskwarrior.IO
-- | Uses task export with a given filter like ["description:Milk",
-- "+PENDING"].
getTasks :: [Text] -> IO [Task]
-- | Uses task import to save the given tasks.
saveTasks :: [Task] -> IO ()