A while back, I was working on the Show function for EMGM [1] and verifying its output vs. that of GHC&#39;s when I discovered (I thought) a minor difference between what was necessary and what GHC did for record syntax. Labeled construction and update, according to the Report [2], have higher precedence than function application. This means that I can do the following<br>

<br>&gt; module Main where<br>&gt; data A = A {x :: Int} deriving Show<br>&gt; main = print $ Just A {x = 5}<br><br>without putting parentheses around A {x = 5}. If I run this in GHCi,<br><br>  *Main&gt; main<br>  Just (A {x = 5})<br>

<br>I see that the derived show in GHC adds parentheses around the record value.<br><br>This led to an issue report [3] which developed a few responses. Some don&#39;t like the grammar as defined, because, at a glance, it appears too much like function application. Others noted that Hugs does not add the parentheses and wanted to see consistency between compilers.<br>

<br>In the spirit of the GHC Bug Sweep [4] and finding resolution, I put the question to the wider community. How should we show record syntax? Should we try to ensure consistency between the compilers? Should we try to print as few parentheses as possible? Should we write a Haskell&#39; proposal to &quot;fix&quot; the grammar and make Just A {x=5} illegal? What do you think?<br>

<br>[1] <a href="http://hackage.haskell.org/packages/archive/emgm/0.3.1/doc/html/Generics-EMGM-Functions-Show.html">http://hackage.haskell.org/packages/archive/emgm/0.3.1/doc/html/Generics-EMGM-Functions-Show.html</a><br>

[2] <a href="http://www.haskell.org/onlinereport/exps.html#sect3">http://www.haskell.org/onlinereport/exps.html#sect3</a><br>[3] <a href="http://hackage.haskell.org/trac/ghc/ticket/2530">http://hackage.haskell.org/trac/ghc/ticket/2530</a><br>

[4] <a href="http://hackage.haskell.org/trac/ghc/wiki/BugSweep">http://hackage.haskell.org/trac/ghc/wiki/BugSweep</a><br><br>Regards,<br>Sean<br>