/usr/share/doc/libghc-src-exts-doc/html/Language-Haskell-Exts-Fixity.html is in libghc-src-exts-doc 1.14.0-1.
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 | <!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>Language.Haskell.Exts.Fixity</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Language-Haskell-Exts-Fixity.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Language-Haskell-Exts-Fixity.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">haskell-src-exts-1.14.0: Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Stability</th><td>stable</td></tr><tr><th>Maintainer</th><td>Niklas Broberg, d00nibro@chalmers.se</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Language.Haskell.Exts.Fixity</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Fixity representation
</a><ul><li><a href="#g:2">Collections of fixities
</a></li></ul></li><li><a href="#g:3">Applying fixities to an AST
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Fixity information to give the parser so that infix operators can
be parsed properly.
</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"><span class="keyword">data</span> <a href="#t:Fixity">Fixity</a> = <a href="#v:Fixity">Fixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:Assoc">Assoc</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> <a href="Language-Haskell-Exts-Syntax.html#t:QName">QName</a></li><li class="src short"><a href="#v:infix_">infix_</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -> [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a>] -> [<a href="Language-Haskell-Exts-Fixity.html#t:Fixity">Fixity</a>]</li><li class="src short"><a href="#v:infixl_">infixl_</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -> [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a>] -> [<a href="Language-Haskell-Exts-Fixity.html#t:Fixity">Fixity</a>]</li><li class="src short"><a href="#v:infixr_">infixr_</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -> [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a>] -> [<a href="Language-Haskell-Exts-Fixity.html#t:Fixity">Fixity</a>]</li><li class="src short"><a href="#v:preludeFixities">preludeFixities</a> :: [<a href="Language-Haskell-Exts-Fixity.html#t:Fixity">Fixity</a>]</li><li class="src short"><a href="#v:baseFixities">baseFixities</a> :: [<a href="Language-Haskell-Exts-Fixity.html#t:Fixity">Fixity</a>]</li><li class="src short"><a href="#v:prefixMinusFixity">prefixMinusFixity</a> :: (<a href="Language-Haskell-Exts-Syntax.html#t:Assoc">Assoc</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>)</li><li class="src short"><span class="keyword">class</span> <a href="#t:AppFixity">AppFixity</a> ast <span class="keyword">where</span><ul class="subs"><li><a href="#v:applyFixities">applyFixities</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => [<a href="Language-Haskell-Exts-Fixity.html#t:Fixity">Fixity</a>] -> ast -> m ast</li></ul></li></ul></div><div id="interface"><h1 id="g:1">Fixity representation
</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Fixity" class="def">Fixity</a> <a href="src/Language-Haskell-Exts-Fixity.html#Fixity" class="link">Source</a></p><div class="doc"><p>Operator fixities are represented by their associativity
(left, right or none) and their precedence (0-9).
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Fixity" class="def">Fixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:Assoc">Assoc</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> <a href="Language-Haskell-Exts-Syntax.html#t:QName">QName</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:Fixity" class="caption collapser" onclick="toggleSection('i:Fixity')">Instances</p><div id="section.i:Fixity" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> <a href="Language-Haskell-Exts-Fixity.html#t:Fixity">Fixity</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Data.html#t:Data">Data</a> <a href="Language-Haskell-Exts-Fixity.html#t:Fixity">Fixity</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> <a href="Language-Haskell-Exts-Fixity.html#t:Fixity">Fixity</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Language-Haskell-Exts-Fixity.html#t:Fixity">Fixity</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Language-Haskell-Exts-Fixity.html#t:Fixity">Fixity</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="doc"><p>The following three functions all create lists of
fixities from textual representations of operators.
The intended usage is e.g.
</p><pre> fixs = infixr_ 0 ["$","$!","`seq`"]
</pre><p>Note that the operators are expected as you would
write them infix, i.e. with ` characters surrounding
<em>varid</em> operators, and <em>varsym</em> operators written as is.
</p></div><div class="top"><p class="src"><a name="v:infix_" class="def">infix_</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -> [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a>] -> [<a href="Language-Haskell-Exts-Fixity.html#t:Fixity">Fixity</a>]<a href="src/Language-Haskell-Exts-Fixity.html#infix_" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:infixl_" class="def">infixl_</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -> [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a>] -> [<a href="Language-Haskell-Exts-Fixity.html#t:Fixity">Fixity</a>]<a href="src/Language-Haskell-Exts-Fixity.html#infixl_" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:infixr_" class="def">infixr_</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -> [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a>] -> [<a href="Language-Haskell-Exts-Fixity.html#t:Fixity">Fixity</a>]<a href="src/Language-Haskell-Exts-Fixity.html#infixr_" class="link">Source</a></p></div><h2 id="g:2">Collections of fixities
</h2><div class="top"><p class="src"><a name="v:preludeFixities" class="def">preludeFixities</a> :: [<a href="Language-Haskell-Exts-Fixity.html#t:Fixity">Fixity</a>]<a href="src/Language-Haskell-Exts-Fixity.html#preludeFixities" class="link">Source</a></p><div class="doc"><p>All fixities defined in the Prelude.
</p></div></div><div class="top"><p class="src"><a name="v:baseFixities" class="def">baseFixities</a> :: [<a href="Language-Haskell-Exts-Fixity.html#t:Fixity">Fixity</a>]<a href="src/Language-Haskell-Exts-Fixity.html#baseFixities" class="link">Source</a></p><div class="doc"><p>All fixities defined in the base package.
</p><p>Note that the <code>+++</code> operator appears in both Control.Arrows and
Text.ParserCombinators.ReadP. The listed precedence for <code>+++</code> in
this list is that of Control.Arrows.
</p></div></div><div class="top"><p class="src"><a name="v:prefixMinusFixity" class="def">prefixMinusFixity</a> :: (<a href="Language-Haskell-Exts-Syntax.html#t:Assoc">Assoc</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>)<a href="src/Language-Haskell-Exts-Fixity.html#prefixMinusFixity" class="link">Source</a></p><div class="doc"><p>Built-in fixity for prefix minus
</p></div></div><h1 id="g:3">Applying fixities to an AST
</h1><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:AppFixity" class="def">AppFixity</a> ast <span class="keyword">where</span><a href="src/Language-Haskell-Exts-Fixity.html#AppFixity" class="link">Source</a></p><div class="doc"><p>All AST elements that may include expressions which in turn may
need fixity tweaking will be instances of this class.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:applyFixities" class="def">applyFixities</a><a href="src/Language-Haskell-Exts-Fixity.html#applyFixities" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m</td><td class="doc empty"> </td></tr><tr><td class="src">=> [<a href="Language-Haskell-Exts-Fixity.html#t:Fixity">Fixity</a>]</td><td class="doc"><p>The fixities to account for.
</p></td></tr><tr><td class="src">-> ast</td><td class="doc"><p>The element to tweak.
</p></td></tr><tr><td class="src">-> m ast</td><td class="doc"><p>The same element, but with operator expressions updated, or a failure.
</p></td></tr></table></div><div class="doc"><p>Tweak any expressions in the element to account for the
fixities given. Assumes that all operator expressions are
fully left associative chains to begin with.
</p></div></div><div class="subs instances"><p id="control.i:AppFixity" class="caption collapser" onclick="toggleSection('i:AppFixity')">Instances</p><div id="section.i:AppFixity" class="show"><table><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:GuardedAlt">GuardedAlt</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:GuardedAlts">GuardedAlts</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:Alt">Alt</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:FieldUpdate">FieldUpdate</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:QualStmt">QualStmt</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:Stmt">Stmt</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:PatField">PatField</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:RPat">RPat</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:PXAttr">PXAttr</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:Pat">Pat</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:Splice">Splice</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:Bracket">Bracket</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:XAttr">XAttr</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:Exp">Exp</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:GuardedRhs">GuardedRhs</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:Rhs">Rhs</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:InstDecl">InstDecl</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:ClassDecl">ClassDecl</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:Match">Match</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:IPBind">IPBind</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:Binds">Binds</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:Annotation">Annotation</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:Decl">Decl</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Haskell-Exts-Fixity.html#t:AppFixity">AppFixity</a> <a href="Language-Haskell-Exts-Syntax.html#t:Module">Module</a></td><td class="doc empty"> </td></tr></table></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>
|