blob: d498a906b2f78784e7aed2706538daaef4902cf0 (
plain) (
tree)
|
|
<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="#" rel="stylesheet" type="text/css" title="Ocean"
/><script src="haddock-util.js" type="text/javascript"
></script
><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"
></script
><script type="text/javascript"
>//
window.onload = function () {pageLoad();};
//
</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
> :: <span class="keyword"
>forall</span
> a. a -> a -> [a]</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 | a -> b <span class="keyword"
>where</span
><ul class="subs"
><li
><span class="keyword"
>type</span
> a <a href="#"
><><</a
> b :: <a href="#"
>*</a
></li
><li
><span class="keyword"
>data</span
> a <a href="#"
>><<</a
> b</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 id="v:-43--45-" class="def"
>(+-)</a
> :: a -> a -> a <a href="#" class="selflink"
>#</a
></p
><div class="doc"
><p
>Operator with no fixity</p
></div
></div
><div class="top"
><p class="src"
><a id="v:-42--47-" class="def"
>(*/)</a
> :: a -> a -> a <span class="fixity"
>infixr 7</span
><span class="rightedge"
></span
> <a href="#" class="selflink"
>#</a
></p
><div class="doc"
><p
>Operator with infixr 7</p
></div
></div
><div class="top"
><p class="src"
><a id="v:foo" class="def"
>foo</a
> :: a -> a -> a <span class="fixity"
>infixl 3</span
><span class="rightedge"
></span
> <a href="#" class="selflink"
>#</a
></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 id="t:Foo" class="def"
>Foo</a
> <a href="#" class="selflink"
>#</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 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 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 id="v::-43-" class="def"
>(:+)</a
> :: <span class="keyword"
>forall</span
> a. a -> a -> [a] <span class="fixity"
>infixr 3</span
><span class="rightedge"
></span
> <a href="#" class="selflink"
>#</a
></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 id="t:-60--45--62-" class="def"
><-></a
> b <span class="keyword"
>where</span
> <span class="fixity"
>infixl 6</span
><span class="rightedge"
></span
> <a href="#" class="selflink"
>#</a
></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 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 id="t:-43--43-" class="def"
>++</a
> b <span class="fixity"
>infix 3</span
><span class="rightedge"
></span
> <a href="#" class="selflink"
>#</a
></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 id="t:-42--42-" class="def"
>**</a
> b <span class="fixity"
>infix 9</span
><span class="rightedge"
></span
> <a href="#" class="selflink"
>#</a
></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 id="t:-62--60--62-" class="def"
>><></a
> b | a -> b <span class="keyword"
>where</span
> <span class="fixity"
>infixr 1</span
><span class="rightedge"
></span
> <a href="#" class="selflink"
>#</a
></p
><div class="doc"
><p
>Class with fixity, including associated types</p
></div
><div class="subs minimal"
><p class="caption"
>Minimal complete definition</p
><p class="src"
><a href="#"
>(>><)</a
>, <a href="#"
>(<<>)</a
>, <a href="#"
>(**>)</a
>, <a href="#"
>(**<)</a
>, <a href="#"
>(>**)</a
>, <a href="#"
>(<**)</a
></p
></div
><div class="subs associated-types"
><p class="caption"
>Associated Types</p
><p class="src"
><span class="keyword"
>type</span
> a <a id="t:-60--62--60-" class="def"
><><</a
> b :: <a href="#"
>*</a
> <span class="fixity"
>infixl 2</span
><span class="rightedge"
></span
> <a href="#" class="selflink"
>#</a
></p
><p class="src"
><span class="keyword"
>data</span
> a <a id="t:-62--60--60-" class="def"
>><<</a
> b <span class="fixity"
>infixl 3</span
><span class="rightedge"
></span
> <a href="#" class="selflink"
>#</a
></p
></div
><div class="subs methods"
><p class="caption"
>Methods</p
><p class="src"
><a id="v:-62--62--60-" class="def"
>(>><)</a
> :: a -> b -> () <span class="fixity"
>infixr 4</span
><span class="rightedge"
></span
> <a href="#" class="selflink"
>#</a
></p
><p class="src"
><a id="v:-60--60--62-" class="def"
>(<<>)</a
> :: a -> b -> () <span class="fixity"
>infixl 5</span
><span class="rightedge"
></span
> <a href="#" class="selflink"
>#</a
></p
><p class="src"
><a id="v:-42--42--62-" class="def"
>(**>)</a
> :: a -> a -> () <span class="fixity"
>infixr 8</span
><span class="rightedge"
></span
> <a href="#" class="selflink"
>#</a
></p
><div class="doc"
><p
>Multiple fixities</p
></div
><p class="src"
><a id="v:-42--42--60-" class="def"
>(**<)</a
> :: a -> a -> () <span class="fixity"
>infixl 8</span
><span class="rightedge"
></span
> <a href="#" class="selflink"
>#</a
></p
><div class="doc"
><p
>Multiple fixities</p
></div
><p class="src"
><a id="v:-62--42--42-" class="def"
>(>**)</a
> :: a -> a -> () <span class="fixity"
>infixr 8</span
><span class="rightedge"
></span
> <a href="#" class="selflink"
>#</a
></p
><div class="doc"
><p
>Multiple fixities</p
></div
><p class="src"
><a id="v:-60--42--42-" class="def"
>(<**)</a
> :: a -> a -> () <span class="fixity"
>infixl 8</span
><span class="rightedge"
></span
> <a href="#" class="selflink"
>#</a
></p
><div class="doc"
><p
>Multiple fixities</p
></div
></div
></div
><div class="top"
><p class="src"
><span class="keyword"
>type</span
> <a 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
> <a href="#" class="selflink"
>#</a
></p
><div class="doc"
><p
>Type synonym with fixity</p
></div
></div
></div
></div
><div id="footer"
></div
></body
></html
>
|