title: syntax extension for compact function definitions within a record
body: <p>The following syntax is the ordinary way of defining a function scoped to a module or within a where clause.</p>
  
  <pre><code>add :: Int -&gt; Int -&gt; Int
  add x y = x + y
  </code></pre>
  
  <p>However, it does not work inside a record. At least by default, this is syntactically invalid</p>
  
  <pre><code>data RecordWithFunc = RecordWithFunc { func :: Int -&gt; Int -&gt; Int}
  
  a :: RecordWithFunc
  a = RecordWithFunc {
      func x y = x + y
  }
  </code></pre>
  
  <p>Here's an example of the GHC frontend producing a parse error</p>
  
  <pre><code>$ runhaskell /tmp/hask.hs 
  
  /tmp/hask.hs:5:10: error: parse error on input ‘x’
    |
  5 |     func x y = x + y
    |          ^
  </code></pre>
  
  <p>Is there a syntax extension that enables arguments to appear after a field name?</p>