Safe Haskell | Safe-Infered |
---|
Account parsers. Account names fall into one of three groups:
- Level 1 account. Can have nearly any character, including spaces. However, when in a Ledger file they must be quoted.
- Level 2 account. The first sub-account begins with a letter. All other characters may be nearly any character, except for a space.
- lvl1Account :: Parser Account
- lvl1AccountQuoted :: Parser Account
- lvl2Account :: Parser Account
- render :: Account -> Maybe Text
- lvl1Char :: Char -> Bool
- lvl2FirstChar :: Char -> Bool
- lvl2RemainingChar :: Char -> Bool
Documentation
render :: Account -> Maybe TextSource
Shows an account, with the minimum level of quoting
possible. Fails with an error if any one of the characters in the
account name does not satisfy the lvl1Char
predicate. Otherwise
returns a rendered account, quoted if necessary.
lvl1Char :: Char -> BoolSource
Characters allowed in a Level 1 account. (Check the source code to see what these are).
lvl2FirstChar :: Char -> BoolSource
Characters allowed for the first character of a Level 2 account.
lvl2RemainingChar :: Char -> BoolSource
Characters allowed for the remaining characters of a Level 2 account.