;lib: Hledger.Read.TimeclockReader cleanup
This commit is contained in:
parent
1bb33be54d
commit
5365fde3bc
@ -1,3 +1,6 @@
|
||||
-- * -*- eval: (orgstruct-mode 1); orgstruct-heading-prefix-regexp:"-- "; -*-
|
||||
-- ** doc
|
||||
-- In Emacs, use TAB on lines beginning with "-- *" to collapse/expand sections.
|
||||
{-|
|
||||
|
||||
A reader for the timeclock file format generated by timeclock.el
|
||||
@ -40,8 +43,15 @@ i, o or O. The meanings of the codes are:
|
||||
|
||||
-}
|
||||
|
||||
{-# LANGUAGE OverloadedStrings, PackageImports #-}
|
||||
-- ** language
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE PackageImports #-}
|
||||
|
||||
-- ** doctest setup
|
||||
-- $setup
|
||||
-- >>> :set -XOverloadedStrings
|
||||
|
||||
-- ** exports
|
||||
module Hledger.Read.TimeclockReader (
|
||||
-- * Reader
|
||||
reader,
|
||||
@ -49,6 +59,8 @@ module Hledger.Read.TimeclockReader (
|
||||
timeclockfilep,
|
||||
)
|
||||
where
|
||||
|
||||
-- ** imports
|
||||
import Prelude ()
|
||||
import "base-compat-batteries" Prelude.Compat
|
||||
import Control.Monad
|
||||
@ -64,6 +76,7 @@ import Hledger.Data
|
||||
import Hledger.Read.Common
|
||||
import Hledger.Utils
|
||||
|
||||
-- ** reader
|
||||
|
||||
reader :: Reader
|
||||
reader = Reader
|
||||
@ -79,6 +92,8 @@ reader = Reader
|
||||
parse :: InputOpts -> FilePath -> Text -> ExceptT String IO Journal
|
||||
parse = parseAndFinaliseJournal' timeclockfilep
|
||||
|
||||
-- ** parsers
|
||||
|
||||
timeclockfilep :: MonadIO m => JournalParser m ParsedJournal
|
||||
timeclockfilep = do many timeclockitemp
|
||||
eof
|
||||
|
||||
Loading…
Reference in New Issue
Block a user