title: How do I create an operator in Haskell?
body: <p>Making a ternary logic table, and I would like to make my own function for an operator that I'll call <code>&lt;=&gt;</code>.  </p>
  
  <p>So, for example, I want to do this, but that isn't right.  what's the correct way to do this?</p>
  
  <pre><code>data Ternary = T | F | M
  deriving (Eq,  Show, Ord)
  
  &lt;=&gt; :: Ternary -&gt; Ternary -&gt; Ternary
  &lt;=&gt; T F = F
  &lt;=&gt; T T = T
  &lt;=&gt; T M = M
  &lt;=&gt; F F = T
  &lt;=&gt; F T = F
  &lt;=&gt; F M = M
  &lt;=&gt; M F = M
  &lt;=&gt; M T = M
  &lt;=&gt; M M = T
  </code></pre>