Skip to content

Commit

Permalink
deploy: 266e808
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mie6 committed Nov 30, 2024
1 parent 08e68fa commit eea6a8d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Text-Gigaparsec-Patterns.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
$(deriveLiftedConstructors &quot;mk&quot; ['PosFoo])</pre><p>This will generate a lifted constructor of the shape:</p><pre>mkPosFoo :: Parsec (Foo Pos)</pre><p>The <code>pos</code> combinator will be applied automatically.</p><p><em>Since: 0.2.6.0</em></p></div></div><div class="top"><p class="src"><a id="v:deriveDeferredConstructors" class="def">deriveDeferredConstructors</a> <a href="src/Text.Gigaparsec.Patterns.html#deriveDeferredConstructors" class="link">Source</a> <a href="#v:deriveDeferredConstructors" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="https://hackage.haskell.org/package/base-4.20.0.0/docs/Data-String.html#t:String" title="Data.String">String</a></td><td class="doc"><p>The prefix to be added to generated names</p></td></tr><tr><td class="src">-&gt; [<a href="https://hackage.haskell.org/package/template-haskell-2.22.0.0/docs/Language-Haskell-TH-Syntax.html#t:Name" title="Language.Haskell.TH.Syntax">Name</a>]</td><td class="doc"><p>The list of &quot;ticked&quot; constructors to generate for</p></td></tr><tr><td class="src">-&gt; <a href="https://hackage.haskell.org/package/template-haskell-2.22.0.0/docs/Language-Haskell-TH-Syntax.html#t:Q" title="Language.Haskell.TH.Syntax">Q</a> [<a href="https://hackage.haskell.org/package/template-haskell-2.22.0.0/docs/Language-Haskell-TH-Syntax.html#t:Dec" title="Language.Haskell.TH.Syntax">Dec</a>]</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>This function is used to automatically generate <em>Deferred Constructors</em>, which are
one of the patterns in <em>&quot;Design Patterns for Parser Combinators</em>&quot;. It is provided
with a prefix, which is used to denote an application of the constructor, and
then a list of &quot;ticked&quot; constructors to generate deferred constructors for. This
then a list of &quot;ticked&quot; constructors for which to generate deferred constructors. This
means adding a single <code>'</code> in front of the constructor name. For example:</p><pre>{-# LANGUAGE TemplateHaskell #-}
data Foo a = Foo a | Bar Int String
$(deriveDeferredConstructors &quot;mk&quot; ['Foo, 'Bar])</pre><p>Will generate two deferred constructors of the shape:</p><pre>mkFoo :: Parsec (a -&gt; Foo a)
Expand Down
2 changes: 1 addition & 1 deletion Text-Gigaparsec-Token-Descriptions.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</pre></details></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:PlusSignPresence" class="def">PlusSignPresence</a> <a href="src/Text.Gigaparsec.Token.Descriptions.html#PlusSignPresence" class="link">Source</a> <a href="#t:PlusSignPresence" class="selflink">#</a></p><div class="doc"><p>Whether or not a plus sign (<code>+</code>) can prefix a numeric literal.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:PlusRequired" class="def">PlusRequired</a></td><td class="doc"><p>(<code>+</code>) must always precede a positive numeric literal</p></td></tr><tr><td class="src"><a id="v:PlusOptional" class="def">PlusOptional</a></td><td class="doc"><p>(<code>+</code>) may precede a positive numeric literal, but is not necessary</p></td></tr><tr><td class="src"><a id="v:PlusIllegal" class="def">PlusIllegal</a></td><td class="doc"><p>(<code>+</code>) cannot precede a numeric literal as a prefix (this is separate to allowing an infix binary <code>+</code> operator).</p></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:TextDesc" class="def">TextDesc</a> <a href="src/Text.Gigaparsec.Token.Descriptions.html#TextDesc" class="link">Source</a> <a href="#t:TextDesc" class="selflink">#</a></p><div class="doc"><p>This type describes how to parse string and character literals.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:TextDesc" class="def">TextDesc</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:escapeSequences" class="def">escapeSequences</a> :: !<a href="Text-Gigaparsec-Token-Descriptions.html#t:EscapeDesc" title="Text.Gigaparsec.Token.Descriptions">EscapeDesc</a></dfn><div class="doc"><p>the description of escape sequences in literals.</p></div></li><li><dfn class="src"><a id="v:characterLiteralEnd" class="def">characterLiteralEnd</a> :: !<a href="https://hackage.haskell.org/package/base-4.20.0.0/docs/Data-Char.html#t:Char" title="Data.Char">Char</a></dfn><div class="doc"><p>the character that starts and ends a character literal.</p></div></li><li><dfn class="src"><a id="v:stringEnds" class="def">stringEnds</a> :: !(<a href="https://hackage.haskell.org/package/containers-0.6.8/docs/Data-Set.html#t:Set" title="Data.Set">Set</a> (<a href="https://hackage.haskell.org/package/base-4.20.0.0/docs/Data-String.html#t:String" title="Data.String">String</a>, <a href="https://hackage.haskell.org/package/base-4.20.0.0/docs/Data-String.html#t:String" title="Data.String">String</a>))</dfn><div class="doc"><p>the sequences that may begin and end a string literal.</p></div></li><li><dfn class="src"><a id="v:multiStringEnds" class="def">multiStringEnds</a> :: !(<a href="https://hackage.haskell.org/package/containers-0.6.8/docs/Data-Set.html#t:Set" title="Data.Set">Set</a> (<a href="https://hackage.haskell.org/package/base-4.20.0.0/docs/Data-String.html#t:String" title="Data.String">String</a>, <a href="https://hackage.haskell.org/package/base-4.20.0.0/docs/Data-String.html#t:String" title="Data.String">String</a>))</dfn><div class="doc"><p>the sequences that may begin and end a multi-line string literal.</p></div></li><li><dfn class="src"><a id="v:graphicCharacter" class="def">graphicCharacter</a> :: !<a href="Text-Gigaparsec-Token-Descriptions.html#t:CharPredicate" title="Text.Gigaparsec.Token.Descriptions">CharPredicate</a></dfn><div class="doc"><p>the characters that can be written verbatim into a character or string literal.</p></div></li></ul></div></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:EscapeDesc" class="def">EscapeDesc</a> <a href="src/Text.Gigaparsec.Token.Descriptions.html#EscapeDesc" class="link">Source</a> <a href="#t:EscapeDesc" class="selflink">#</a></p><div class="doc"><p>Defines the escape characters, and their meaning.</p><p>This includes character escapes (e.g. tabs, carriage returns), and numeric escapes, such as binary (usually &quot;0b&quot;) and hexadecimal, &quot;0x&quot;.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:EscapeDesc" class="def">EscapeDesc</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:escBegin" class="def">escBegin</a> :: !<a href="https://hackage.haskell.org/package/base-4.20.0.0/docs/Data-Char.html#t:Char" title="Data.Char">Char</a></dfn><div class="doc"><p>the character that begins an escape sequence: this is usually <code>\</code>.</p></div></li><li><dfn class="src"><a id="v:literals" class="def">literals</a> :: !(<a href="https://hackage.haskell.org/package/containers-0.6.8/docs/Data-Set.html#t:Set" title="Data.Set">Set</a> <a href="https://hackage.haskell.org/package/base-4.20.0.0/docs/Data-Char.html#t:Char" title="Data.Char">Char</a>)</dfn><div class="doc"><p>the characters that can be directly escaped, but still represent themselves, for instance '&quot;', or '\'.</p></div></li><li><dfn class="src"><a id="v:mapping" class="def">mapping</a> :: !(<a href="https://hackage.haskell.org/package/containers-0.6.8/docs/Data-Map-Strict.html#t:Map" title="Data.Map.Strict">Map</a> <a href="https://hackage.haskell.org/package/base-4.20.0.0/docs/Data-String.html#t:String" title="Data.String">String</a> <a href="https://hackage.haskell.org/package/base-4.20.0.0/docs/Data-Char.html#t:Char" title="Data.Char">Char</a>)</dfn><div class="doc"><p>the possible escape sequences that map to a character other than themselves and the (full UTF-16) character they map to, for instance &quot;n&quot; -&gt; 0xa</p></div></li><li><dfn class="src"><a id="v:decimalEscape" class="def">decimalEscape</a> :: !<a href="Text-Gigaparsec-Token-Descriptions.html#t:NumericEscape" title="Text.Gigaparsec.Token.Descriptions">NumericEscape</a></dfn><div class="doc"><p>if allowed, the description of how numeric escape sequences work for base 10.</p></div></li><li><dfn class="src"><a id="v:hexadecimalEscape" class="def">hexadecimalEscape</a> :: !<a href="Text-Gigaparsec-Token-Descriptions.html#t:NumericEscape" title="Text.Gigaparsec.Token.Descriptions">NumericEscape</a></dfn><div class="doc"><p>if allowed, the description of how numeric escape sequences work for base 16</p></div></li><li><dfn class="src"><a id="v:octalEscape" class="def">octalEscape</a> :: !<a href="Text-Gigaparsec-Token-Descriptions.html#t:NumericEscape" title="Text.Gigaparsec.Token.Descriptions">NumericEscape</a></dfn><div class="doc"><p>if allowed, the description of how numeric escape sequences work for base 8</p></div></li><li><dfn class="src"><a id="v:binaryEscape" class="def">binaryEscape</a> :: !<a href="Text-Gigaparsec-Token-Descriptions.html#t:NumericEscape" title="Text.Gigaparsec.Token.Descriptions">NumericEscape</a></dfn><div class="doc"><p>if allowed, the description of how numeric escape sequences work for base 2</p></div></li><li><dfn class="src"><a id="v:emptyEscape" class="def">emptyEscape</a> :: !(<a href="https://hackage.haskell.org/package/base-4.20.0.0/docs/Data-Maybe.html#t:Maybe" title="Data.Maybe">Maybe</a> <a href="https://hackage.haskell.org/package/base-4.20.0.0/docs/Data-Char.html#t:Char" title="Data.Char">Char</a>)</dfn><div class="doc"><p>if one should exist, the character which has no effect on
the string but can be used to disambiguate other escape sequences: in Haskell this would be &amp;</p></div></li><li><dfn class="src"><a id="v:gapsSupported" class="def">gapsSupported</a> :: !<a href="https://hackage.haskell.org/package/base-4.20.0.0/docs/Data-Bool.html#t:Bool" title="Data.Bool">Bool</a></dfn><div class="doc"><p>specifies whether or not string gaps are supported:
this is where whitespace can be injected between two escBegin characters and this will all be ignored in the final string,
such that &quot;hello world&quot; is &quot;hello world&quot;</p></div></li></ul></div></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:NumberOfDigits" class="def">NumberOfDigits</a> <a href="src/Text.Gigaparsec.Token.Descriptions.html#NumberOfDigits" class="link">Source</a> <a href="#t:NumberOfDigits" class="selflink">#</a></p><div class="doc"><p>Describes how many digits a numeric escape sequence is allowed.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Unbounded" class="def">Unbounded</a></td><td class="doc"><p>there is no limit on the number of digits that may appear in this sequence.</p></td></tr><tr><td class="src"><a id="v:Exactly" class="def">Exactly</a> !(<a href="https://hackage.haskell.org/package/base-4.20.0.0/docs/Data-List-NonEmpty.html#t:NonEmpty" title="Data.List.NonEmpty">NonEmpty</a> <a href="https://hackage.haskell.org/package/base-4.20.0.0/docs/Data-Word.html#t:Word" title="Data.Word">Word</a>)</td><td class="doc"><p>the number of digits in the literal must be one of the given values.</p></td></tr><tr><td class="src"><a id="v:AtMost" class="def">AtMost</a></td><td class="doc"><p>there must be at most <code>n</code> digits in the numeric escape literal, up to and including the value given.</p></td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src">!<a href="https://hackage.haskell.org/package/base-4.20.0.0/docs/Data-Word.html#t:Word" title="Data.Word">Word</a></dfn><div class="doc"><p>the maximum (inclusive) number of digits allowed in the literal..</p></div></li></ul></div></td></tr></table></div></div><div class="top"><p class="src"><a id="v:plain" class="def">plain</a> :: <a href="Text-Gigaparsec-Token-Descriptions.html#t:LexicalDesc" title="Text.Gigaparsec.Token.Descriptions">LexicalDesc</a> <a href="src/Text.Gigaparsec.Token.Descriptions.html#plain" class="link">Source</a> <a href="#v:plain" class="selflink">#</a></p><div class="doc"><p>This lexical description contains the template <code>plain&lt;...&gt;</code> descriptions defined in this module.
such that <code>&quot;hello world&quot;</code> is &quot;hello world&quot;</p></div></li></ul></div></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:NumberOfDigits" class="def">NumberOfDigits</a> <a href="src/Text.Gigaparsec.Token.Descriptions.html#NumberOfDigits" class="link">Source</a> <a href="#t:NumberOfDigits" class="selflink">#</a></p><div class="doc"><p>Describes how many digits a numeric escape sequence is allowed.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Unbounded" class="def">Unbounded</a></td><td class="doc"><p>there is no limit on the number of digits that may appear in this sequence.</p></td></tr><tr><td class="src"><a id="v:Exactly" class="def">Exactly</a> !(<a href="https://hackage.haskell.org/package/base-4.20.0.0/docs/Data-List-NonEmpty.html#t:NonEmpty" title="Data.List.NonEmpty">NonEmpty</a> <a href="https://hackage.haskell.org/package/base-4.20.0.0/docs/Data-Word.html#t:Word" title="Data.Word">Word</a>)</td><td class="doc"><p>the number of digits in the literal must be one of the given values.</p></td></tr><tr><td class="src"><a id="v:AtMost" class="def">AtMost</a></td><td class="doc"><p>there must be at most <code>n</code> digits in the numeric escape literal, up to and including the value given.</p></td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src">!<a href="https://hackage.haskell.org/package/base-4.20.0.0/docs/Data-Word.html#t:Word" title="Data.Word">Word</a></dfn><div class="doc"><p>the maximum (inclusive) number of digits allowed in the literal..</p></div></li></ul></div></td></tr></table></div></div><div class="top"><p class="src"><a id="v:plain" class="def">plain</a> :: <a href="Text-Gigaparsec-Token-Descriptions.html#t:LexicalDesc" title="Text.Gigaparsec.Token.Descriptions">LexicalDesc</a> <a href="src/Text.Gigaparsec.Token.Descriptions.html#plain" class="link">Source</a> <a href="#v:plain" class="selflink">#</a></p><div class="doc"><p>This lexical description contains the template <code>plain&lt;...&gt;</code> descriptions defined in this module.
See <code><a href="Text-Gigaparsec-Token-Descriptions.html#v:plainName" title="Text.Gigaparsec.Token.Descriptions">plainName</a></code>, <code><a href="Text-Gigaparsec-Token-Descriptions.html#v:plainSymbol" title="Text.Gigaparsec.Token.Descriptions">plainSymbol</a></code>, <code><a href="Text-Gigaparsec-Token-Descriptions.html#v:plainNumeric" title="Text.Gigaparsec.Token.Descriptions">plainNumeric</a></code>, <code><a href="Text-Gigaparsec-Token-Descriptions.html#v:plainText" title="Text.Gigaparsec.Token.Descriptions">plainText</a></code> and <code><a href="Text-Gigaparsec-Token-Descriptions.html#v:plainSpace" title="Text.Gigaparsec.Token.Descriptions">plainSpace</a></code> for how this description configures the lexer.</p></div></div><div class="top"><p class="src"><a id="v:plainName" class="def">plainName</a> :: <a href="Text-Gigaparsec-Token-Descriptions.html#t:NameDesc" title="Text.Gigaparsec.Token.Descriptions">NameDesc</a> <a href="src/Text.Gigaparsec.Token.Descriptions.html#plainName" class="link">Source</a> <a href="#v:plainName" class="selflink">#</a></p><div class="doc"><p>This is a blank name description template, which should be extended to form a custom name description.</p><p>In its default state, <code><a href="Text-Gigaparsec-Token-Descriptions.html#v:plainName" title="Text.Gigaparsec.Token.Descriptions">plainName</a></code> makes no characters able to be part of an identifier or operator.
To change this, one should use record field copies, for example:</p><pre>myNameDesc :: NameDesc
myNameDesc = plainName
Expand Down
Binary file modified gigaparsec.haddock
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Text.Gigaparsec.Patterns.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
This function is used to automatically generate /Deferred Constructors/, which are
one of the patterns in /&quot;Design Patterns for Parser Combinators/&quot;. It is provided
with a prefix, which is used to denote an application of the constructor, and
then a list of &quot;ticked&quot; constructors to generate deferred constructors for. This
then a list of &quot;ticked&quot; constructors for which to generate deferred constructors. This
means adding a single @'@ in front of the constructor name. For example:

&gt; {-# LANGUAGE TemplateHaskell #-}
Expand Down
2 changes: 1 addition & 1 deletion src/Text.Gigaparsec.Token.Descriptions.html
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@
</span><span id="line-548"></span><span> </span><span class="hs-special">,</span><span> </span><span id="gapsSupported"><span class="annot"><span class="annottext">EscapeDesc -&gt; Bool
</span><a href="Text.Gigaparsec.Token.Descriptions.html#gapsSupported"><span class="hs-identifier hs-var hs-var">gapsSupported</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-comment">-- ^ specifies whether or not string gaps are supported:</span><span>
</span><span id="line-549"></span><span> </span><span class="hs-comment">-- this is where whitespace can be injected between two escBegin characters and this will all be ignored in the final string,</span><span>
</span><span id="line-550"></span><span> </span><span class="hs-comment">-- such that &quot;hello \ \world&quot; is &quot;hello world&quot;</span><span>
</span><span id="line-550"></span><span> </span><span class="hs-comment">-- such that @&quot;hello \ \world&quot;@ is &quot;hello world&quot;</span><span>
</span><span id="line-551"></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-552"></span><span>
</span><span id="line-553"></span><span class="annot"><span class="hs-comment">{-|
Expand Down
Loading

0 comments on commit eea6a8d

Please sign in to comment.