mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-25 19:31:44 +03:00
;lib: comments
[ci skip]
This commit is contained in:
parent
9c4ef58154
commit
50f8539911
@ -1003,13 +1003,14 @@ multilinecommentp = startComment *> anyLine `skipManyTill` endComment
|
||||
|
||||
{-# INLINABLE multilinecommentp #-}
|
||||
|
||||
-- | A blank or comment line in journal format: a line that's empty or
|
||||
-- containing only whitespace or whose first non-whitespace character
|
||||
-- is semicolon, hash, or star.
|
||||
emptyorcommentlinep :: TextParser m ()
|
||||
emptyorcommentlinep = do
|
||||
skipMany spacenonewline
|
||||
skiplinecommentp <|> void newline
|
||||
where
|
||||
-- A line (file-level) comment can start with a semicolon, hash, or star
|
||||
-- (allowing org nodes).
|
||||
skiplinecommentp :: TextParser m ()
|
||||
skiplinecommentp = do
|
||||
satisfy $ \c -> c == ';' || c == '#' || c == '*'
|
||||
|
@ -204,8 +204,8 @@ dbg9With = ptraceAtWith 9
|
||||
dbgExit :: Show a => String -> a -> a
|
||||
dbgExit msg = const (unsafePerformIO exitFailure) . dbg0 msg
|
||||
|
||||
-- | Like ptraceAt, but convenient to insert in an IO monad (plus
|
||||
-- convenience aliases).
|
||||
-- | Like ptraceAt, but convenient to insert in an IO monad and
|
||||
-- enforces monadic sequencing (plus convenience aliases).
|
||||
-- XXX These have a bug; they should use
|
||||
-- traceIO, not trace, otherwise GHC can occasionally over-optimise
|
||||
-- (cf lpaste a few days ago where it killed/blocked a child thread).
|
||||
|
Loading…
Reference in New Issue
Block a user