Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>From the <a href="http://www.haskell.org/onlinereport/lexemes.html" rel="nofollow noreferrer">haskell report</a>, this is the syntax for allowed symbols:</p> <p><code>a | b</code> means <code>a or b</code> and </p> <p><code>a&lt;b&gt;</code> means <code>a except b</code></p> <pre><code>special -&gt; ( | ) | , | ; | [ | ] | `| { | } symbol -&gt; ascSymbol | uniSymbol&lt;special | _ | : | " | '&gt; ascSymbol -&gt; ! | # | $ | % | &amp; | * | + | . | / | &lt; | = | &gt; | ? | @ \ | ^ | | | - | ~ uniSymbol -&gt; any Unicode symbol or punctuation </code></pre> <p>So, symbols are ascii symbols or unicode symbols except from those in <code>special | _ | : | " | '</code>, which are reserved.</p> <p>so the following can't be used: <code>| , ; [ ] ` { } _ : " '</code></p> <p>A few paragraphs below, the report gives the complete definition for haskell operators:</p> <pre><code>varsym -&gt; ( symbol {symbol | :})&lt;reservedop | dashes&gt; consym -&gt; (: {symbol | :})&lt;reservedop&gt; reservedop -&gt; .. | : | :: | = | \ | | | &lt;- | -&gt; | @ | ~ | =&gt; </code></pre> <blockquote> <p>Operator symbols are formed from one or more symbol characters, as defined above, and are lexically distinguished into two namespaces (Section 1.4):</p> <ul> <li>An operator symbol starting with a colon is a constructor.</li> <li>An operator symbol starting with any other character is an ordinary identifier. </li> </ul> <p>Notice that a colon by itself, ":", is reserved solely for use as the Haskell list constructor; this makes its treatment uniform with other parts of list syntax, such as "[]" and "[a,b]".</p> <p>Other than the special syntax for prefix negation, all operators are infix, although each infix operator can be used in a section to yield partially applied operators (see Section 3.5). All of the standard infix operators are just predefined symbols and may be rebound.</p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload