title: How do I define infix functions in Haskell?
body: <p>I'd like to define a function as infix, so that users don't have to manually surround the function with backticks to call it. Specifically, I'm writing a DSL-like function that accepts a Rank and Suit and contructs a Poker card record:</p>
  
  <pre><code>-- pseudocode
  data PokerCard = PokerCard { rank :: Rank, suit :: Suit } deriving (Eq)
  
  of :: Rank -&gt; Suit -&gt; PokerCard
  r of s = PokerCard { rank = r, suit = s }
  
  pokerDeck = [
    Ace of Spades,
    Two of Spades,
    ...
    ]
  </code></pre>
  
  <p>I believe <code>of</code> is reserved as syntax for <code>case ... of</code> expressions, so I'd have to rename it something like <code>of'</code>, <code>.of</code>, <code>+of</code>, etc.</p>