From 50f8539911bbe9a73371fd00f7214bd57e433f08 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 29 Feb 2020 09:42:04 -0800 Subject: [PATCH] ;lib: comments [ci skip] --- hledger-lib/Hledger/Read/Common.hs | 5 +++-- hledger-lib/Hledger/Utils/Debug.hs | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hledger-lib/Hledger/Read/Common.hs b/hledger-lib/Hledger/Read/Common.hs index cc5ae488f..53c1b64d5 100644 --- a/hledger-lib/Hledger/Read/Common.hs +++ b/hledger-lib/Hledger/Read/Common.hs @@ -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 == '*' diff --git a/hledger-lib/Hledger/Utils/Debug.hs b/hledger-lib/Hledger/Utils/Debug.hs index 7609ca2d8..e2938ce42 100644 --- a/hledger-lib/Hledger/Utils/Debug.hs +++ b/hledger-lib/Hledger/Utils/Debug.hs @@ -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).