blob: 6ac8ae3818e1fa2a6af9b71a1f6434be1f4cba1b (
plain) (
tree)
|
|
<!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
>Operators</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_Operators.html");};
//]]>
</script
></head
><body
><div id="package-header"
><ul class="links" id="page-menu"
><li
><a href=""
>Contents</a
></li
><li
><a href=""
>Index</a
></li
></ul
><p class="caption empty"
> </p
></div
><div id="content"
><div id="module-header"
><table class="info"
><tr
><th
>Safe Haskell</th
><td
>Safe</td
></tr
></table
><p class="caption"
>Operators</p
></div
><div id="description"
><p class="caption"
>Description</p
><div class="doc"
><p
>Test operators with or without fixity declarations</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=""
>(+-)</a
> :: a -> a -> a</li
><li class="src short"
><a href=""
>(*/)</a
> :: a -> a -> a</li
><li class="src short"
><a href=""
>foo</a
> :: a -> a -> a</li
><li class="src short"
><span class="keyword"
>data</span
> <a href=""
>Foo</a
><ul class="subs"
><li
>= <a href=""
>Foo</a
> <a href=""
>`Bar`</a
> <a href=""
>Foo</a
></li
><li
>| <a href=""
>Foo</a
> <a href=""
>:-</a
> <a href=""
>Foo</a
></li
></ul
></li
><li class="src short"
><span class="keyword"
>pattern</span
> <a href=""
>(:+)</a
> :: t -> t -> [t]</li
><li class="src short"
><span class="keyword"
>data</span
> a <a href=""
><-></a
> b <span class="keyword"
>where</span
><ul class="subs"
><li
><a href=""
>(:<->)</a
> :: a -> b -> a <a href=""
><-></a
> b</li
></ul
></li
><li class="src short"
><span class="keyword"
>type family</span
> a <a href=""
>++</a
> b</li
><li class="src short"
><span class="keyword"
>data family</span
> a <a href=""
>**</a
> b</li
><li class="src short"
><span class="keyword"
>class</span
> a <a href=""
>><></a
> b <span class="keyword"
>where</span
><ul class="subs"
><li
><span class="keyword"
>type</span
> a <a href=""
><><</a
> b :: *</li
><li
><span class="keyword"
>data</span
> a <a href=""
>><<</a
> b</li
><li
><a href=""
>(>><)</a
>, <a href=""
>(<<>)</a
> :: a -> b -> ()</li
><li
><a href=""
>(**>)</a
>, <a href=""
>(**<)</a
>, <a href=""
>(>**)</a
>, <a href=""
>(<**)</a
> :: a -> a -> ()</li
></ul
></li
><li class="src short"
><span class="keyword"
>type</span
> <a href=""
>(>-<)</a
> a b = a <a href=""
><-></a
> b</li
></ul
></div
><div id="interface"
><h1
>Documentation</h1
><div class="top"
><p class="src"
><a href="" id="v:-43--45-" class="def"
>(+-)</a
> :: a -> a -> a</p
><div class="doc"
><p
>Operator with no fixity</p
></div
></div
><div class="top"
><p class="src"
><a href="" id="v:-42--47-" class="def"
>(*/)</a
> :: a -> a -> a <span class="fixity"
>infixr 7</span
><span class="rightedge"
></span
></p
><div class="doc"
><p
>Operator with infixr 7</p
></div
></div
><div class="top"
><p class="src"
><a href="" id="v:foo" class="def"
>foo</a
> :: a -> a -> a <span class="fixity"
>infixl 3</span
><span class="rightedge"
></span
></p
><div class="doc"
><p
>Named function with infixl 3</p
></div
></div
><div class="top"
><p class="src"
><span class="keyword"
>data</span
> <a href="" id="t:Foo" class="def"
>Foo</a
></p
><div class="doc"
><p
>Data type with operator constructors</p
></div
><div class="subs constructors"
><p class="caption"
>Constructors</p
><table
><tr
><td class="src"
><a href=""
>Foo</a
> <a href="" id="v:Bar" class="def"
>`Bar`</a
> <a href=""
>Foo</a
> <span class="fixity"
>infixl 3</span
><span class="rightedge"
></span
></td
><td class="doc"
><p
>Has infixl 3</p
></td
></tr
><tr
><td class="src"
><a href=""
>Foo</a
> <a href="" id="v::-45-" class="def"
>:-</a
> <a href=""
>Foo</a
> <span class="fixity"
>infixr 5</span
><span class="rightedge"
></span
></td
><td class="doc"
><p
>Has infixr 5</p
></td
></tr
></table
></div
></div
><div class="top"
><p class="src"
><span class="keyword"
>pattern</span
> <a href="" id="v::-43-" class="def"
>(:+)</a
> :: t -> t -> [t] <span class="fixity"
>infixr 3</span
><span class="rightedge"
></span
></p
><div class="doc"
><p
>Pattern synonym, infixr 3</p
></div
></div
><div class="top"
><p class="src"
><span class="keyword"
>data</span
> a <a href="" id="t:-60--45--62-" class="def"
><-></a
> b <span class="keyword"
>where</span
> <span class="fixity"
>infixl 6</span
><span class="rightedge"
></span
></p
><div class="doc"
><p
>Type name, infixl 6 and GADT constructor</p
></div
><div class="subs constructors"
><p class="caption"
>Constructors</p
><table
><tr
><td class="src"
><a href="" id="v::-60--45--62-" class="def"
>(:<->)</a
> :: a -> b -> a <a href=""
><-></a
> b <span class="fixity"
>infixr 6</span
><span class="rightedge"
></span
></td
><td class="doc empty"
> </td
></tr
></table
></div
></div
><div class="top"
><p class="src"
><span class="keyword"
>type family</span
> a <a href="" id="t:-43--43-" class="def"
>++</a
> b <span class="fixity"
>infix 3</span
><span class="rightedge"
></span
></p
><div class="doc"
><p
>Type family with fixity</p
></div
></div
><div class="top"
><p class="src"
><span class="keyword"
>data family</span
> a <a href="" id="t:-42--42-" class="def"
>**</a
> b <span class="fixity"
>infix 9</span
><span class="rightedge"
></span
></p
><div class="doc"
><p
>Data family with fixity</p
></div
></div
><div class="top"
><p class="src"
><span class="keyword"
>class</span
> a <a href="" id="t:-62--60--62-" class="def"
>><></a
> b <span class="keyword"
>where</span
> <span class="fixity"
>infixr 1</span
><span class="rightedge"
></span
></p
><div class="doc"
><p
>Class with fixity, including associated types</p
></div
><div class="subs associated-types"
><p class="caption"
>Associated Types</p
><p class="src"
><span class="keyword"
>type</span
> a <a href="" id="t:-60--62--60-" class="def"
><><</a
> b :: * <span class="fixity"
>infixl 2</span
><span class="rightedge"
></span
></p
><p class="src"
><span class="keyword"
>data</span
> a <a href="" id="t:-62--60--60-" class="def"
>><<</a
> b <span class="fixity"
>infixl 3</span
><span class="rightedge"
></span
></p
></div
><div class="subs methods"
><p class="caption"
>Methods</p
><p class="src"
><a href="" id="v:-62--62--60-" class="def"
>(>><)</a
>, <a href="" id="v:-60--60--62-" class="def"
>(<<>)</a
> :: a -> b -> () <span class="fixity"
>infixl 5 <<></span
><span class="fixity"
>infixr 4 >><</span
><span class="rightedge"
></span
></p
><p class="src"
><a href="" id="v:-42--42--62-" class="def"
>(**>)</a
>, <a href="" id="v:-42--42--60-" class="def"
>(**<)</a
>, <a href="" id="v:-62--42--42-" class="def"
>(>**)</a
>, <a href="" id="v:-60--42--42-" class="def"
>(<**)</a
> :: a -> a -> () <span class="fixity"
>infixr 8 **>, >**</span
><span class="fixity"
>infixl 8 **<, <**</span
><span class="rightedge"
></span
></p
><div class="doc"
><p
>Multiple fixities</p
></div
></div
></div
><div class="top"
><p class="src"
><span class="keyword"
>type</span
> <a href="" id="t:-62--45--60-" class="def"
>(>-<)</a
> a b = a <a href=""
><-></a
> b <span class="fixity"
>infixl 6</span
><span class="rightedge"
></span
></p
><div class="doc"
><p
>Type synonym with fixity</p
></div
></div
></div
></div
><div id="footer"
><p
>Produced by <a href=""
>Haddock</a
> version 2.16.2</p
></div
></body
></html
>
|