This file is indexed.

/usr/share/doc/libghc-hledger-lib-doc/html/Hledger-Read-Common.html is in libghc-hledger-lib-doc 1.2-1build3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Hledger.Read.Common</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Hledger-Read-Common.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Hledger-Read-Common.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hledger-lib-1.2: Core data types, parsers and functionality for the hledger accounting tools</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Hledger.Read.Common</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Some common parsers and helpers used by several readers.
Some of these might belong in Hledger.Read.JournalReader or Hledger.Read.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:runTextParser">runTextParser</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor-Identity.html#t:Identity">Identity</a> a -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> (<a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Error.html#t:ParseError">ParseError</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Error.html#t:Dec">Dec</a>) a</li><li class="src short"><a href="#v:rtp">rtp</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor-Identity.html#t:Identity">Identity</a> a -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> (<a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Error.html#t:ParseError">ParseError</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Error.html#t:Dec">Dec</a>) a</li><li class="src short"><a href="#v:runJournalParser">runJournalParser</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m a -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> (<a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Error.html#t:ParseError">ParseError</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Error.html#t:Dec">Dec</a>) a)</li><li class="src short"><a href="#v:rjp">rjp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m a -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> (<a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Error.html#t:ParseError">ParseError</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Error.html#t:Dec">Dec</a>) a)</li><li class="src short"><a href="#v:runErroringJournalParser">runErroringJournalParser</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:ErroringJournalParser">ErroringJournalParser</a> m a -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> a)</li><li class="src short"><a href="#v:rejp">rejp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:ErroringJournalParser">ErroringJournalParser</a> m a -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> a)</li><li class="src short"><a href="#v:genericSourcePos">genericSourcePos</a> :: <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Pos.html#t:SourcePos">SourcePos</a> -&gt; <a href="Hledger-Data-Types.html#t:GenericSourcePos">GenericSourcePos</a></li><li class="src short"><a href="#v:journalSourcePos">journalSourcePos</a> :: <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Pos.html#t:SourcePos">SourcePos</a> -&gt; <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Pos.html#t:SourcePos">SourcePos</a> -&gt; <a href="Hledger-Data-Types.html#t:GenericSourcePos">GenericSourcePos</a></li><li class="src short"><a href="#v:parseAndFinaliseJournal">parseAndFinaliseJournal</a> :: <a href="Hledger-Utils-Parse.html#t:ErroringJournalParser">ErroringJournalParser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="Hledger-Data-Types.html#t:ParsedJournal">ParsedJournal</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Except.html#t:ExceptT">ExceptT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="Hledger-Data-Types.html#t:Journal">Journal</a></li><li class="src short"><a href="#v:parseAndFinaliseJournal-39-">parseAndFinaliseJournal'</a> :: <a href="Hledger-Utils-Parse.html#t:JournalParser">JournalParser</a> <a href="Hledger-Data-Types.html#t:ParsedJournal">ParsedJournal</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Except.html#t:ExceptT">ExceptT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="Hledger-Data-Types.html#t:Journal">Journal</a></li><li class="src short"><a href="#v:setYear">setYear</a> :: <a href="Hledger-Data-Types.html#t:Year">Year</a> -&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m ()</li><li class="src short"><a href="#v:getYear">getYear</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Hledger-Data-Types.html#t:Year">Year</a>)</li><li class="src short"><a href="#v:setDefaultCommodityAndStyle">setDefaultCommodityAndStyle</a> :: (<a href="Hledger-Data-Types.html#t:CommoditySymbol">CommoditySymbol</a>, <a href="Hledger-Data-Types.html#t:AmountStyle">AmountStyle</a>) -&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m ()</li><li class="src short"><a href="#v:getDefaultCommodityAndStyle">getDefaultCommodityAndStyle</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Hledger-Data-Types.html#t:CommoditySymbol">CommoditySymbol</a>, <a href="Hledger-Data-Types.html#t:AmountStyle">AmountStyle</a>))</li><li class="src short"><a href="#v:pushAccount">pushAccount</a> :: <a href="Hledger-Data-Types.html#t:AccountName">AccountName</a> -&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m ()</li><li class="src short"><a href="#v:pushParentAccount">pushParentAccount</a> :: <a href="Hledger-Data-Types.html#t:AccountName">AccountName</a> -&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m ()</li><li class="src short"><a href="#v:popParentAccount">popParentAccount</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m ()</li><li class="src short"><a href="#v:getParentAccount">getParentAccount</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="Hledger-Data-Types.html#t:AccountName">AccountName</a></li><li class="src short"><a href="#v:addAccountAlias">addAccountAlias</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> <a href="Hledger-Data-Types.html#t:Journal">Journal</a> m =&gt; <a href="Hledger-Data-Types.html#t:AccountAlias">AccountAlias</a> -&gt; m ()</li><li class="src short"><a href="#v:getAccountAliases">getAccountAliases</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> <a href="Hledger-Data-Types.html#t:Journal">Journal</a> m =&gt; m [<a href="Hledger-Data-Types.html#t:AccountAlias">AccountAlias</a>]</li><li class="src short"><a href="#v:clearAccountAliases">clearAccountAliases</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> <a href="Hledger-Data-Types.html#t:Journal">Journal</a> m =&gt; m ()</li><li class="src short"><a href="#v:journalAddFile">journalAddFile</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a>, <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>) -&gt; <a href="Hledger-Data-Types.html#t:Journal">Journal</a> -&gt; <a href="Hledger-Data-Types.html#t:Journal">Journal</a></li><li class="src short"><a href="#v:parserErrorAt">parserErrorAt</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Pos.html#t:SourcePos">SourcePos</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="Hledger-Utils-Parse.html#t:ErroringJournalParser">ErroringJournalParser</a> m a</li><li class="src short"><a href="#v:statusp">statusp</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m <a href="Hledger-Data-Types.html#t:ClearedStatus">ClearedStatus</a></li><li class="src short"><a href="#v:codep">codep</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:descriptionp">descriptionp</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:datep">datep</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a></li><li class="src short"><a href="#v:datetimep">datetimep</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-LocalTime.html#t:LocalTime">LocalTime</a></li><li class="src short"><a href="#v:secondarydatep">secondarydatep</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a> -&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a></li><li class="src short"><a href="#v:modifiedaccountnamep">modifiedaccountnamep</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="Hledger-Data-Types.html#t:AccountName">AccountName</a></li><li class="src short"><a href="#v:accountnamep">accountnamep</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m <a href="Hledger-Data-Types.html#t:AccountName">AccountName</a></li><li class="src short"><a href="#v:spaceandamountormissingp">spaceandamountormissingp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="Hledger-Data-Types.html#t:MixedAmount">MixedAmount</a></li><li class="src short"><a href="#v:amountp">amountp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="Hledger-Data-Types.html#t:Amount">Amount</a></li><li class="src short"><a href="#v:amountp-39-">amountp'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="Hledger-Data-Types.html#t:Amount">Amount</a></li><li class="src short"><a href="#v:mamountp-39-">mamountp'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="Hledger-Data-Types.html#t:MixedAmount">MixedAmount</a></li><li class="src short"><a href="#v:signp">signp</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:leftsymbolamountp">leftsymbolamountp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="Hledger-Data-Types.html#t:Amount">Amount</a></li><li class="src short"><a href="#v:rightsymbolamountp">rightsymbolamountp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="Hledger-Data-Types.html#t:Amount">Amount</a></li><li class="src short"><a href="#v:nosymbolamountp">nosymbolamountp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="Hledger-Data-Types.html#t:Amount">Amount</a></li><li class="src short"><a href="#v:commoditysymbolp">commoditysymbolp</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m <a href="Hledger-Data-Types.html#t:CommoditySymbol">CommoditySymbol</a></li><li class="src short"><a href="#v:quotedcommoditysymbolp">quotedcommoditysymbolp</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m <a href="Hledger-Data-Types.html#t:CommoditySymbol">CommoditySymbol</a></li><li class="src short"><a href="#v:simplecommoditysymbolp">simplecommoditysymbolp</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m <a href="Hledger-Data-Types.html#t:CommoditySymbol">CommoditySymbol</a></li><li class="src short"><a href="#v:priceamountp">priceamountp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="Hledger-Data-Types.html#t:Price">Price</a></li><li class="src short"><a href="#v:partialbalanceassertionp">partialbalanceassertionp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Hledger-Data-Types.html#t:Amount">Amount</a>)</li><li class="src short"><a href="#v:fixedlotpricep">fixedlotpricep</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Hledger-Data-Types.html#t:Amount">Amount</a>)</li><li class="src short"><a href="#v:numberp">numberp</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m (<a href="Hledger-Data-Types.html#t:Quantity">Quantity</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Hledger-Data-Types.html#t:DigitGroupStyle">DigitGroupStyle</a>)</li><li class="src short"><a href="#v:multilinecommentp">multilinecommentp</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m ()</li><li class="src short"><a href="#v:emptyorcommentlinep">emptyorcommentlinep</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m ()</li><li class="src short"><a href="#v:followingcommentp">followingcommentp</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:followingcommentandtagsp">followingcommentandtagsp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a> -&gt; <a href="Hledger-Utils-Parse.html#t:ErroringJournalParser">ErroringJournalParser</a> m (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>, [<a href="Hledger-Data-Types.html#t:Tag">Tag</a>], <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a>)</li><li class="src short"><a href="#v:commentp">commentp</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:commentchars">commentchars</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>]</li><li class="src short"><a href="#v:semicoloncommentp">semicoloncommentp</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:commentStartingWithp">commentStartingWithp</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>] -&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:commentTags">commentTags</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; [<a href="Hledger-Data-Types.html#t:Tag">Tag</a>]</li><li class="src short"><a href="#v:tagsp">tagsp</a> :: <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Text.html#t:Parser">Parser</a> [<a href="Hledger-Data-Types.html#t:Tag">Tag</a>]</li><li class="src short"><a href="#v:nontagp">nontagp</a> :: <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Text.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:tagp">tagp</a> :: <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Text.html#t:Parser">Parser</a> <a href="Hledger-Data-Types.html#t:Tag">Tag</a></li><li class="src short"><a href="#v:tagnamep">tagnamep</a> :: <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Text.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:tagvaluep">tagvaluep</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:postingdatesp">postingdatesp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a> -&gt; <a href="Hledger-Utils-Parse.html#t:ErroringJournalParser">ErroringJournalParser</a> m [(<a href="Hledger-Data-Types.html#t:TagName">TagName</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a>)]</li><li class="src short"><a href="#v:datetagp">datetagp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a> -&gt; <a href="Hledger-Utils-Parse.html#t:ErroringJournalParser">ErroringJournalParser</a> m (<a href="Hledger-Data-Types.html#t:TagName">TagName</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a>)</li><li class="src short"><a href="#v:bracketeddatetagsp">bracketeddatetagsp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a> -&gt; <a href="Hledger-Utils-Parse.html#t:ErroringJournalParser">ErroringJournalParser</a> m [(<a href="Hledger-Data-Types.html#t:TagName">TagName</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a>)]</li></ul></div><div id="interface"><h1>Documentation</h1><div class="doc empty">&nbsp;</div><div class="top"><p class="src"><a id="v:runTextParser" class="def">runTextParser</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor-Identity.html#t:Identity">Identity</a> a -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> (<a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Error.html#t:ParseError">ParseError</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Error.html#t:Dec">Dec</a>) a <a href="src/Hledger-Read-Common.html#runTextParser" class="link">Source</a> <a href="#v:runTextParser" class="selflink">#</a></p><div class="doc"><p>Run a string parser with no state in the identity monad.</p></div></div><div class="top"><p class="src"><a id="v:rtp" class="def">rtp</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor-Identity.html#t:Identity">Identity</a> a -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> (<a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Error.html#t:ParseError">ParseError</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Error.html#t:Dec">Dec</a>) a <a href="src/Hledger-Read-Common.html#rtp" class="link">Source</a> <a href="#v:rtp" class="selflink">#</a></p><div class="doc"><p>Run a string parser with no state in the identity monad.</p></div></div><div class="top"><p class="src"><a id="v:runJournalParser" class="def">runJournalParser</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m a -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> (<a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Error.html#t:ParseError">ParseError</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Error.html#t:Dec">Dec</a>) a) <a href="src/Hledger-Read-Common.html#runJournalParser" class="link">Source</a> <a href="#v:runJournalParser" class="selflink">#</a></p><div class="doc"><p>Run a journal parser with a null journal-parsing state.</p></div></div><div class="top"><p class="src"><a id="v:rjp" class="def">rjp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m a -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> (<a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Error.html#t:ParseError">ParseError</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Error.html#t:Dec">Dec</a>) a) <a href="src/Hledger-Read-Common.html#rjp" class="link">Source</a> <a href="#v:rjp" class="selflink">#</a></p><div class="doc"><p>Run a journal parser with a null journal-parsing state.</p></div></div><div class="top"><p class="src"><a id="v:runErroringJournalParser" class="def">runErroringJournalParser</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:ErroringJournalParser">ErroringJournalParser</a> m a -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> a) <a href="src/Hledger-Read-Common.html#runErroringJournalParser" class="link">Source</a> <a href="#v:runErroringJournalParser" class="selflink">#</a></p><div class="doc"><p>Run an error-raising journal parser with a null journal-parsing state.</p></div></div><div class="top"><p class="src"><a id="v:rejp" class="def">rejp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:ErroringJournalParser">ErroringJournalParser</a> m a -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> a) <a href="src/Hledger-Read-Common.html#rejp" class="link">Source</a> <a href="#v:rejp" class="selflink">#</a></p><div class="doc"><p>Run an error-raising journal parser with a null journal-parsing state.</p></div></div><div class="top"><p class="src"><a id="v:genericSourcePos" class="def">genericSourcePos</a> :: <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Pos.html#t:SourcePos">SourcePos</a> -&gt; <a href="Hledger-Data-Types.html#t:GenericSourcePos">GenericSourcePos</a> <a href="src/Hledger-Read-Common.html#genericSourcePos" class="link">Source</a> <a href="#v:genericSourcePos" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:journalSourcePos" class="def">journalSourcePos</a> :: <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Pos.html#t:SourcePos">SourcePos</a> -&gt; <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Pos.html#t:SourcePos">SourcePos</a> -&gt; <a href="Hledger-Data-Types.html#t:GenericSourcePos">GenericSourcePos</a> <a href="src/Hledger-Read-Common.html#journalSourcePos" class="link">Source</a> <a href="#v:journalSourcePos" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:parseAndFinaliseJournal" class="def">parseAndFinaliseJournal</a> :: <a href="Hledger-Utils-Parse.html#t:ErroringJournalParser">ErroringJournalParser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="Hledger-Data-Types.html#t:ParsedJournal">ParsedJournal</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Except.html#t:ExceptT">ExceptT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="Hledger-Data-Types.html#t:Journal">Journal</a> <a href="src/Hledger-Read-Common.html#parseAndFinaliseJournal" class="link">Source</a> <a href="#v:parseAndFinaliseJournal" class="selflink">#</a></p><div class="doc"><p>Given a megaparsec ParsedJournal parser, balance assertion flag, file
 path and file content: parse and post-process a Journal, or give an error.</p></div></div><div class="top"><p class="src"><a id="v:parseAndFinaliseJournal-39-" class="def">parseAndFinaliseJournal'</a> :: <a href="Hledger-Utils-Parse.html#t:JournalParser">JournalParser</a> <a href="Hledger-Data-Types.html#t:ParsedJournal">ParsedJournal</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Except.html#t:ExceptT">ExceptT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="Hledger-Data-Types.html#t:Journal">Journal</a> <a href="src/Hledger-Read-Common.html#parseAndFinaliseJournal%27" class="link">Source</a> <a href="#v:parseAndFinaliseJournal-39-" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:setYear" class="def">setYear</a> :: <a href="Hledger-Data-Types.html#t:Year">Year</a> -&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m () <a href="src/Hledger-Read-Common.html#setYear" class="link">Source</a> <a href="#v:setYear" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getYear" class="def">getYear</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Hledger-Data-Types.html#t:Year">Year</a>) <a href="src/Hledger-Read-Common.html#getYear" class="link">Source</a> <a href="#v:getYear" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:setDefaultCommodityAndStyle" class="def">setDefaultCommodityAndStyle</a> :: (<a href="Hledger-Data-Types.html#t:CommoditySymbol">CommoditySymbol</a>, <a href="Hledger-Data-Types.html#t:AmountStyle">AmountStyle</a>) -&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m () <a href="src/Hledger-Read-Common.html#setDefaultCommodityAndStyle" class="link">Source</a> <a href="#v:setDefaultCommodityAndStyle" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getDefaultCommodityAndStyle" class="def">getDefaultCommodityAndStyle</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Hledger-Data-Types.html#t:CommoditySymbol">CommoditySymbol</a>, <a href="Hledger-Data-Types.html#t:AmountStyle">AmountStyle</a>)) <a href="src/Hledger-Read-Common.html#getDefaultCommodityAndStyle" class="link">Source</a> <a href="#v:getDefaultCommodityAndStyle" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:pushAccount" class="def">pushAccount</a> :: <a href="Hledger-Data-Types.html#t:AccountName">AccountName</a> -&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m () <a href="src/Hledger-Read-Common.html#pushAccount" class="link">Source</a> <a href="#v:pushAccount" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:pushParentAccount" class="def">pushParentAccount</a> :: <a href="Hledger-Data-Types.html#t:AccountName">AccountName</a> -&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m () <a href="src/Hledger-Read-Common.html#pushParentAccount" class="link">Source</a> <a href="#v:pushParentAccount" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:popParentAccount" class="def">popParentAccount</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m () <a href="src/Hledger-Read-Common.html#popParentAccount" class="link">Source</a> <a href="#v:popParentAccount" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getParentAccount" class="def">getParentAccount</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="Hledger-Data-Types.html#t:AccountName">AccountName</a> <a href="src/Hledger-Read-Common.html#getParentAccount" class="link">Source</a> <a href="#v:getParentAccount" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:addAccountAlias" class="def">addAccountAlias</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> <a href="Hledger-Data-Types.html#t:Journal">Journal</a> m =&gt; <a href="Hledger-Data-Types.html#t:AccountAlias">AccountAlias</a> -&gt; m () <a href="src/Hledger-Read-Common.html#addAccountAlias" class="link">Source</a> <a href="#v:addAccountAlias" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getAccountAliases" class="def">getAccountAliases</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> <a href="Hledger-Data-Types.html#t:Journal">Journal</a> m =&gt; m [<a href="Hledger-Data-Types.html#t:AccountAlias">AccountAlias</a>] <a href="src/Hledger-Read-Common.html#getAccountAliases" class="link">Source</a> <a href="#v:getAccountAliases" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:clearAccountAliases" class="def">clearAccountAliases</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> <a href="Hledger-Data-Types.html#t:Journal">Journal</a> m =&gt; m () <a href="src/Hledger-Read-Common.html#clearAccountAliases" class="link">Source</a> <a href="#v:clearAccountAliases" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:journalAddFile" class="def">journalAddFile</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a>, <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>) -&gt; <a href="Hledger-Data-Types.html#t:Journal">Journal</a> -&gt; <a href="Hledger-Data-Types.html#t:Journal">Journal</a> <a href="src/Hledger-Read-Common.html#journalAddFile" class="link">Source</a> <a href="#v:journalAddFile" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:parserErrorAt" class="def">parserErrorAt</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Pos.html#t:SourcePos">SourcePos</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="Hledger-Utils-Parse.html#t:ErroringJournalParser">ErroringJournalParser</a> m a <a href="src/Hledger-Read-Common.html#parserErrorAt" class="link">Source</a> <a href="#v:parserErrorAt" class="selflink">#</a></p><div class="doc"><p>Terminate parsing entirely, returning the given error message
 with the given parse position prepended.</p></div></div><div class="top"><p class="src"><a id="v:statusp" class="def">statusp</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m <a href="Hledger-Data-Types.html#t:ClearedStatus">ClearedStatus</a> <a href="src/Hledger-Read-Common.html#statusp" class="link">Source</a> <a href="#v:statusp" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:codep" class="def">codep</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/Hledger-Read-Common.html#codep" class="link">Source</a> <a href="#v:codep" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:descriptionp" class="def">descriptionp</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/Hledger-Read-Common.html#descriptionp" class="link">Source</a> <a href="#v:descriptionp" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:datep" class="def">datep</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a> <a href="src/Hledger-Read-Common.html#datep" class="link">Source</a> <a href="#v:datep" class="selflink">#</a></p><div class="doc"><p>Parse a date in YYYY<em>MM</em>DD format.
 Hyphen (-) and period (.) are also allowed as separators.
 The year may be omitted if a default year has been set.
 Leading zeroes may be omitted.</p></div></div><div class="top"><p class="src"><a id="v:datetimep" class="def">datetimep</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-LocalTime.html#t:LocalTime">LocalTime</a> <a href="src/Hledger-Read-Common.html#datetimep" class="link">Source</a> <a href="#v:datetimep" class="selflink">#</a></p><div class="doc"><p>Parse a date and time in YYYY<em>MM</em>DD HH:MM[:SS][+-ZZZZ] format.
 Hyphen (-) and period (.) are also allowed as date separators.
 The year may be omitted if a default year has been set.
 Seconds are optional.
 The timezone is optional and ignored (the time is always interpreted as a local time).
 Leading zeroes may be omitted (except in a timezone).</p></div></div><div class="top"><p class="src"><a id="v:secondarydatep" class="def">secondarydatep</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a> -&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a> <a href="src/Hledger-Read-Common.html#secondarydatep" class="link">Source</a> <a href="#v:secondarydatep" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:modifiedaccountnamep" class="def">modifiedaccountnamep</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="Hledger-Data-Types.html#t:AccountName">AccountName</a> <a href="src/Hledger-Read-Common.html#modifiedaccountnamep" class="link">Source</a> <a href="#v:modifiedaccountnamep" class="selflink">#</a></p><div class="doc"><pre>&gt; parsewith twoorthreepartdatestringp &quot;2016/01/2&quot;</pre><p>Right &quot;2016<em>01</em>2&quot;
 twoorthreepartdatestringp = do
   n1 &lt;- some digitChar
   c &lt;- datesepchar
   n2 &lt;- some digitChar
   mn3 <a href="-">optional $ char c</a>&gt; some digitChar
   return $ n1 ++ c:n2 ++ maybe &quot;&quot; (c:) mn3</p><p>Parse an account name, then apply any parent account prefix and/or account aliases currently in effect.</p></div></div><div class="top"><p class="src"><a id="v:accountnamep" class="def">accountnamep</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m <a href="Hledger-Data-Types.html#t:AccountName">AccountName</a> <a href="src/Hledger-Read-Common.html#accountnamep" class="link">Source</a> <a href="#v:accountnamep" class="selflink">#</a></p><div class="doc"><p>Parse an account name. Account names start with a non-space, may
 have single spaces inside them, and are terminated by two or more
 spaces (or end of input). Also they have one or more components of
 at least one character, separated by the account separator char.
 (This parser will also consume one following space, if present.)</p></div></div><div class="top"><p class="src"><a id="v:spaceandamountormissingp" class="def">spaceandamountormissingp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="Hledger-Data-Types.html#t:MixedAmount">MixedAmount</a> <a href="src/Hledger-Read-Common.html#spaceandamountormissingp" class="link">Source</a> <a href="#v:spaceandamountormissingp" class="selflink">#</a></p><div class="doc"><p>Parse whitespace then an amount, with an optional left or right
 currency symbol and optional price, or return the special
 &quot;missing&quot; marker amount.</p></div></div><div class="top"><p class="src"><a id="v:amountp" class="def">amountp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="Hledger-Data-Types.html#t:Amount">Amount</a> <a href="src/Hledger-Read-Common.html#amountp" class="link">Source</a> <a href="#v:amountp" class="selflink">#</a></p><div class="doc"><p>Parse a single-commodity amount, with optional symbol on the left or
 right, optional unit or total price, and optional (ignored)
 ledger-style balance assertion or fixed lot price declaration.</p></div></div><div class="top"><p class="src"><a id="v:amountp-39-" class="def">amountp'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="Hledger-Data-Types.html#t:Amount">Amount</a> <a href="src/Hledger-Read-Common.html#amountp%27" class="link">Source</a> <a href="#v:amountp-39-" class="selflink">#</a></p><div class="doc"><p>Parse an amount from a string, or get an error.</p></div></div><div class="top"><p class="src"><a id="v:mamountp-39-" class="def">mamountp'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="Hledger-Data-Types.html#t:MixedAmount">MixedAmount</a> <a href="src/Hledger-Read-Common.html#mamountp%27" class="link">Source</a> <a href="#v:mamountp-39-" class="selflink">#</a></p><div class="doc"><p>Parse a mixed amount from a string, or get an error.</p></div></div><div class="top"><p class="src"><a id="v:signp" class="def">signp</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/Hledger-Read-Common.html#signp" class="link">Source</a> <a href="#v:signp" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:leftsymbolamountp" class="def">leftsymbolamountp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="Hledger-Data-Types.html#t:Amount">Amount</a> <a href="src/Hledger-Read-Common.html#leftsymbolamountp" class="link">Source</a> <a href="#v:leftsymbolamountp" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:rightsymbolamountp" class="def">rightsymbolamountp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="Hledger-Data-Types.html#t:Amount">Amount</a> <a href="src/Hledger-Read-Common.html#rightsymbolamountp" class="link">Source</a> <a href="#v:rightsymbolamountp" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:nosymbolamountp" class="def">nosymbolamountp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="Hledger-Data-Types.html#t:Amount">Amount</a> <a href="src/Hledger-Read-Common.html#nosymbolamountp" class="link">Source</a> <a href="#v:nosymbolamountp" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:commoditysymbolp" class="def">commoditysymbolp</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m <a href="Hledger-Data-Types.html#t:CommoditySymbol">CommoditySymbol</a> <a href="src/Hledger-Read-Common.html#commoditysymbolp" class="link">Source</a> <a href="#v:commoditysymbolp" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:quotedcommoditysymbolp" class="def">quotedcommoditysymbolp</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m <a href="Hledger-Data-Types.html#t:CommoditySymbol">CommoditySymbol</a> <a href="src/Hledger-Read-Common.html#quotedcommoditysymbolp" class="link">Source</a> <a href="#v:quotedcommoditysymbolp" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:simplecommoditysymbolp" class="def">simplecommoditysymbolp</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m <a href="Hledger-Data-Types.html#t:CommoditySymbol">CommoditySymbol</a> <a href="src/Hledger-Read-Common.html#simplecommoditysymbolp" class="link">Source</a> <a href="#v:simplecommoditysymbolp" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:priceamountp" class="def">priceamountp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="Hledger-Data-Types.html#t:Price">Price</a> <a href="src/Hledger-Read-Common.html#priceamountp" class="link">Source</a> <a href="#v:priceamountp" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:partialbalanceassertionp" class="def">partialbalanceassertionp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Hledger-Data-Types.html#t:Amount">Amount</a>) <a href="src/Hledger-Read-Common.html#partialbalanceassertionp" class="link">Source</a> <a href="#v:partialbalanceassertionp" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:fixedlotpricep" class="def">fixedlotpricep</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Hledger-Data-Types.html#t:Amount">Amount</a>) <a href="src/Hledger-Read-Common.html#fixedlotpricep" class="link">Source</a> <a href="#v:fixedlotpricep" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:numberp" class="def">numberp</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m (<a href="Hledger-Data-Types.html#t:Quantity">Quantity</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Hledger-Data-Types.html#t:DigitGroupStyle">DigitGroupStyle</a>) <a href="src/Hledger-Read-Common.html#numberp" class="link">Source</a> <a href="#v:numberp" class="selflink">#</a></p><div class="doc"><p>Parse a string representation of a number for its value and display
 attributes.</p><p>Some international number formats are accepted, eg either period or comma
 may be used for the decimal point, and the other of these may be used for
 separating digit groups in the integer part. See
 <a href="http://en.wikipedia.org/wiki/Decimal_separator">http://en.wikipedia.org/wiki/Decimal_separator</a> for more examples.</p><p>This returns: the parsed numeric value, the precision (number of digits
 seen following the decimal point), the decimal point character used if any,
 and the digit group style if any.</p></div></div><div class="top"><p class="src"><a id="v:multilinecommentp" class="def">multilinecommentp</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m () <a href="src/Hledger-Read-Common.html#multilinecommentp" class="link">Source</a> <a href="#v:multilinecommentp" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:emptyorcommentlinep" class="def">emptyorcommentlinep</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m () <a href="src/Hledger-Read-Common.html#emptyorcommentlinep" class="link">Source</a> <a href="#v:emptyorcommentlinep" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:followingcommentp" class="def">followingcommentp</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="src/Hledger-Read-Common.html#followingcommentp" class="link">Source</a> <a href="#v:followingcommentp" class="selflink">#</a></p><div class="doc"><p>Parse a possibly multi-line comment following a semicolon.</p></div></div><div class="top"><p class="src"><a id="v:followingcommentandtagsp" class="def">followingcommentandtagsp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a> -&gt; <a href="Hledger-Utils-Parse.html#t:ErroringJournalParser">ErroringJournalParser</a> m (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>, [<a href="Hledger-Data-Types.html#t:Tag">Tag</a>], <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a>) <a href="src/Hledger-Read-Common.html#followingcommentandtagsp" class="link">Source</a> <a href="#v:followingcommentandtagsp" class="selflink">#</a></p><div class="doc"><p>Parse a possibly multi-line comment following a semicolon, and
 any tags and/or posting dates within it. Posting dates can be
 expressed with &quot;date&quot;<em>&quot;date2&quot; tags and</em>or bracketed dates.  The
 dates are parsed in full here so that errors are reported in the
 right position. Missing years can be inferred if a default date is
 provided.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>rejp (followingcommentandtagsp (Just $ fromGregorian 2000 1 2)) &quot;; a:b, date:3/4, [=5/6]&quot;
</code></strong>Right (&quot;a:b, date:3/4, [=5/6]\n&quot;,[(&quot;a&quot;,&quot;b&quot;),(&quot;date&quot;,&quot;3/4&quot;)],Just 2000-03-04,Just 2000-05-06)
</pre><p>Year unspecified and no default provided -&gt; unknown year error, at correct position:
 &gt;&gt;&gt; rejp (followingcommentandtagsp Nothing) &quot;  ;    xxx   date:3/4n  ; second line&quot;
 Left ...1:22...partial date 3/4 found, but the current year is unknown...</p><p>Date tag value contains trailing text - forgot the comma, confused:
 the syntaxes ?  We'll accept the leading date anyway
 &gt;&gt;&gt; rejp (followingcommentandtagsp (Just $ fromGregorian 2000 1 2)) &quot;; date:3<em>4=5</em>6&quot;
 Right (&quot;date:3<em>4=5</em>6n&quot;,[(&quot;date&quot;,&quot;3<em>4=5</em>6&quot;)],Just 2000-03-04,Nothing)</p></div></div><div class="top"><p class="src"><a id="v:commentp" class="def">commentp</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="src/Hledger-Read-Common.html#commentp" class="link">Source</a> <a href="#v:commentp" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:commentchars" class="def">commentchars</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>] <a href="src/Hledger-Read-Common.html#commentchars" class="link">Source</a> <a href="#v:commentchars" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:semicoloncommentp" class="def">semicoloncommentp</a> :: <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="src/Hledger-Read-Common.html#semicoloncommentp" class="link">Source</a> <a href="#v:semicoloncommentp" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:commentStartingWithp" class="def">commentStartingWithp</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>] -&gt; <a href="Hledger-Utils-Parse.html#t:JournalStateParser">JournalStateParser</a> m <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="src/Hledger-Read-Common.html#commentStartingWithp" class="link">Source</a> <a href="#v:commentStartingWithp" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:commentTags" class="def">commentTags</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; [<a href="Hledger-Data-Types.html#t:Tag">Tag</a>] <a href="src/Hledger-Read-Common.html#commentTags" class="link">Source</a> <a href="#v:commentTags" class="selflink">#</a></p><div class="doc"><p>Extract any tags (name:value ended by comma or newline) embedded in a string.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>commentTags &quot;a b:, c:c d:d, e&quot;
</code></strong>[(&quot;b&quot;,&quot;&quot;),(&quot;c&quot;,&quot;c d:d&quot;)]
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>commentTags &quot;a [1/1/1] [1/1] [1], [=1/1/1] [=1/1] [=1] [1/1=1/1/1] [1=1/1/1] b:c&quot;
</code></strong>[(&quot;b&quot;,&quot;c&quot;)]
</pre><ul><li>-[(&quot;date&quot;,&quot;1<em>1</em>1&quot;),(&quot;date&quot;,&quot;1<em>1&quot;),(&quot;date2&quot;,&quot;1</em>1<em>1&quot;),(&quot;date2&quot;,&quot;1</em>1&quot;),(&quot;date&quot;,&quot;1<em>1&quot;),(&quot;date2&quot;,&quot;1</em>1<em>1&quot;),(&quot;date&quot;,&quot;1&quot;),(&quot;date2&quot;,&quot;1</em>1/1&quot;)]</li></ul><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>commentTags &quot;\na b:, \nd:e, f&quot;
</code></strong>[(&quot;b&quot;,&quot;&quot;),(&quot;d&quot;,&quot;e&quot;)]
</pre></div></div><div class="top"><p class="src"><a id="v:tagsp" class="def">tagsp</a> :: <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Text.html#t:Parser">Parser</a> [<a href="Hledger-Data-Types.html#t:Tag">Tag</a>] <a href="src/Hledger-Read-Common.html#tagsp" class="link">Source</a> <a href="#v:tagsp" class="selflink">#</a></p><div class="doc"><p>Parse all tags found in a string.</p></div></div><div class="top"><p class="src"><a id="v:nontagp" class="def">nontagp</a> :: <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Text.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/Hledger-Read-Common.html#nontagp" class="link">Source</a> <a href="#v:nontagp" class="selflink">#</a></p><div class="doc"><p>Parse everything up till the first tag.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>rtp nontagp &quot;\na b:, \nd:e, f&quot;
</code></strong>Right &quot;\na &quot;
</pre></div></div><div class="top"><p class="src"><a id="v:tagp" class="def">tagp</a> :: <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Text.html#t:Parser">Parser</a> <a href="Hledger-Data-Types.html#t:Tag">Tag</a> <a href="src/Hledger-Read-Common.html#tagp" class="link">Source</a> <a href="#v:tagp" class="selflink">#</a></p><div class="doc"><p>Tags begin with a colon-suffixed tag name (a word beginning with
 a letter) and are followed by a tag value (any text up to a comma
 or newline, whitespace-stripped).</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>rtp tagp &quot;a:b b , c AuxDate: 4/2&quot;
</code></strong>Right (&quot;a&quot;,&quot;b b&quot;)
</pre></div></div><div class="top"><p class="src"><a id="v:tagnamep" class="def">tagnamep</a> :: <a href="file:///usr/share/doc/libghc-megaparsec-doc/html/Text-Megaparsec-Text.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="src/Hledger-Read-Common.html#tagnamep" class="link">Source</a> <a href="#v:tagnamep" class="selflink">#</a></p><div class="doc"><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>rtp tagnamep &quot;a:&quot;
</code></strong>Right &quot;a&quot;
</pre></div></div><div class="top"><p class="src"><a id="v:tagvaluep" class="def">tagvaluep</a> :: <a href="Hledger-Utils-Parse.html#t:TextParser">TextParser</a> m <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="src/Hledger-Read-Common.html#tagvaluep" class="link">Source</a> <a href="#v:tagvaluep" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:postingdatesp" class="def">postingdatesp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a> -&gt; <a href="Hledger-Utils-Parse.html#t:ErroringJournalParser">ErroringJournalParser</a> m [(<a href="Hledger-Data-Types.html#t:TagName">TagName</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a>)] <a href="src/Hledger-Read-Common.html#postingdatesp" class="link">Source</a> <a href="#v:postingdatesp" class="selflink">#</a></p><div class="doc"><p>Parse all posting dates found in a string. Posting dates can be
 expressed with date<em>date2 tags and</em>or bracketed dates.  The dates
 are parsed fully to give useful errors. Missing years can be
 inferred only if a default date is provided.</p></div></div><div class="top"><p class="src"><a id="v:datetagp" class="def">datetagp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a> -&gt; <a href="Hledger-Utils-Parse.html#t:ErroringJournalParser">ErroringJournalParser</a> m (<a href="Hledger-Data-Types.html#t:TagName">TagName</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a>) <a href="src/Hledger-Read-Common.html#datetagp" class="link">Source</a> <a href="#v:datetagp" class="selflink">#</a></p><div class="doc"><p>Date tags are tags with name &quot;date&quot; or &quot;date2&quot;. Their value is
 parsed as a date, using the provided default date if any for
 inferring a missing year if needed. Any error in date parsing is
 reported and terminates parsing.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>rejp (datetagp Nothing) &quot;date: 2000/1/2 &quot;
</code></strong>Right (&quot;date&quot;,2000-01-02)
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>rejp (datetagp (Just $ fromGregorian 2001 2 3)) &quot;date2:3/4&quot;
</code></strong>Right (&quot;date2&quot;,2001-03-04)
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>rejp (datetagp Nothing) &quot;date:  3/4&quot;
</code></strong>Left ...1:9...partial date 3/4 found, but the current year is unknown...
</pre></div></div><div class="top"><p class="src"><a id="v:bracketeddatetagsp" class="def">bracketeddatetagsp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a> -&gt; <a href="Hledger-Utils-Parse.html#t:ErroringJournalParser">ErroringJournalParser</a> m [(<a href="Hledger-Data-Types.html#t:TagName">TagName</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.6.0.1/Data-Time-Calendar.html#t:Day">Day</a>)] <a href="src/Hledger-Read-Common.html#bracketeddatetagsp" class="link">Source</a> <a href="#v:bracketeddatetagsp" class="selflink">#</a></p><div class="doc"><p>Parse Ledger-style bracketed posting dates ([DATE=DATE2]), as
 &quot;date&quot; and/or &quot;date2&quot; tags. Anything that looks like an attempt at
 this (a square-bracketed sequence of 0123456789/-.= containing at
 least one digit and one date separator) is also parsed, and will
 throw an appropriate error.</p><p>The dates are parsed in full here so that errors are reported in
 the right position. A missing year in DATE can be inferred if a
 default date is provided. A missing year in DATE2 will be inferred
 from DATE.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>rejp (bracketeddatetagsp Nothing) &quot;[2016/1/2=3/4]&quot;
</code></strong>Right [(&quot;date&quot;,2016-01-02),(&quot;date2&quot;,2016-03-04)]
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>rejp (bracketeddatetagsp Nothing) &quot;[1]&quot;
</code></strong>Left ...not a bracketed date...
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>rejp (bracketeddatetagsp Nothing) &quot;[2016/1/32]&quot;
</code></strong>Left ...1:11:...bad date: 2016/1/32...
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>rejp (bracketeddatetagsp Nothing) &quot;[1/31]&quot;
</code></strong>Left ...1:6:...partial date 1/31 found, but the current year is unknown...
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>rejp (bracketeddatetagsp Nothing) &quot;[0123456789/-.=/-.=]&quot;
</code></strong>Left ...1:15:...bad date, different separators...
</pre></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>