Safe Haskell | None |
---|
Parsec parsers for the ledger file format.
- nonEmpty :: Parser a -> Parser (NonEmpty a)
- lvl1SubAcct :: Parser SubAccount
- lvl1FirstSubAcct :: Parser SubAccount
- lvl1OtherSubAcct :: Parser SubAccount
- lvl1Acct :: Parser Account
- quotedLvl1Acct :: Parser Account
- lvl2FirstSubAcct :: Parser SubAccount
- lvl2OtherSubAcct :: Parser SubAccount
- lvl2Acct :: Parser Account
- ledgerAcct :: Parser Account
- lvl1Cmdty :: Parser Commodity
- quotedLvl1Cmdty :: Parser Commodity
- lvl2Cmdty :: Parser Commodity
- lvl3Cmdty :: Parser Commodity
- digit :: Parser Digit
- digitList :: Parser DigitList
- groupPart :: Parser a -> Parser (a, DigitList)
- groupedDigits :: Parser a -> Parser (GroupedDigits a)
- digitsRadDigits :: Parser a -> Parser void -> Parser (GroupedDigits a, Maybe (GroupedDigits a))
- unquotedQtyRep :: Parser QtyRep
- unquotedQtyRepWithSpaces :: Parser QtyRep
- quotedCommaQtyRep :: Parser QtyRep
- quotedPeriodQtyRep :: Parser QtyRep
- qtyRep :: Parser QtyRep
- spaceBetween :: Parser SpaceBetween
- leftCmdtyLvl1Amt :: Parser (Amount QtyRep, Side, SpaceBetween)
- leftCmdtyLvl3Amt :: Parser (Amount QtyRep, Side, SpaceBetween)
- leftSideCmdtyAmt :: Parser (Amount QtyRep, Side, SpaceBetween)
- rightSideCmdty :: Parser Commodity
- rightSideCmdtyAmt :: Parser (Amount QtyRep, Side, SpaceBetween)
- amount :: Parser (Amount QtyRep, Side, SpaceBetween)
- comment :: Parser Comment
- year :: Parser Integer
- month :: Parser Int
- day :: Parser Int
- date :: Parser Day
- hours :: Parser Hours
- minutes :: Parser Minutes
- seconds :: Parser Seconds
- time :: Parser (Hours, Minutes, Maybe Seconds)
- tzSign :: Parser (Int -> Int)
- tzNumber :: Parser Int
- timeZone :: Parser TimeZoneOffset
- timeWithZone :: Parser (Hours, Minutes, Maybe Seconds, Maybe TimeZoneOffset)
- dateTime :: Parser DateTime
- debit :: Parser DrCr
- credit :: Parser DrCr
- drCr :: Parser DrCr
- entry :: Parser (Entry QtyRep, Side, SpaceBetween)
- flag :: Parser Flag
- postingMemoLine :: Parser Text
- postingMemo :: Parser Memo
- transactionMemoLine :: Parser Text
- transactionMemo :: Parser (TopMemoLine, Memo)
- number :: Parser Number
- lvl1Payee :: Parser Payee
- quotedLvl1Payee :: Parser Payee
- lvl2Payee :: Parser Payee
- fromCmdty :: Parser From
- lineNum :: Parser Int
- price :: Parser PricePoint
- tag :: Parser Tag
- tags :: Parser Tags
- topLinePayee :: Parser Payee
- topLineFlagNum :: Parser (Maybe Flag, Maybe Number)
- skipWhite :: Parser ()
- topLine :: Parser ParsedTopLine
- flagNumPayee :: Parser (Maybe Flag, Maybe Number, Maybe Payee)
- postingAcct :: Parser Account
- posting :: Parser (PostingCore, PostingLine, Maybe (Entry QtyRep))
- transaction :: Parser ParsedTxn
- blankLine :: Parser ()
- item :: Parser ParsedItem
- parse :: Text -> Either String [ParsedItem]
- getStdin :: IO Text
- getFileContentsStdin :: String -> IO (Filename, Text)
- parseStdinOnly :: IO (Filename, [ParsedItem])
- parseFromFilename :: String -> IO (Filename, [ParsedItem])
- handleParseError :: String -> String -> IO a
Documentation
groupedDigits :: Parser a -> Parser (GroupedDigits a)Source
:: Parser a | Parses a single grouping character |
-> Parser void | Parses a radix point |
-> Parser (GroupedDigits a, Maybe (GroupedDigits a)) |
Parses a sequence of grouped digits, followed by an optional radix point, followed by an optional additional sequence of grouped digits. Numbers such as .25 are not allowed; instead, the user must enter 0.25. Also not allowed is something like 25.. Intsead, if the user enters a radix, there must be a character after it.
unquotedQtyRep :: Parser QtyRepSource
Parses an unquoted QtyRep.
unquotedQtyRepWithSpaces :: Parser QtyRepSource
Parses an unquoted QtyRep that also has spaces. Use only when parsing command line items.
quotedCommaQtyRep :: Parser QtyRepSource
Parses a QtyRep that is quoted with square braces. This is a QtyRep that uses a comma as the radix point.
quotedPeriodQtyRep :: Parser QtyRepSource
Parses a QtyRep that is quoted with curly braces. This is a QtyRep that uses a period as the radix point. Unlike an unquoted QtyRep this can include spaces.
posting :: Parser (PostingCore, PostingLine, Maybe (Entry QtyRep))Source
:: Text | Contents of file to be parsed |
-> Either String [ParsedItem] | Returns items if successfully parsed; otherwise, returns an error message. |
parseStdinOnly :: IO (Filename, [ParsedItem])Source
parseFromFilename :: String -> IO (Filename, [ParsedItem])Source