Permitting trailing commas for record syntax ADT declarations

Daniel Trstenjak daniel.trstenjak at gmail.com
Wed Sep 24 07:13:11 UTC 2014


On Wed, Sep 24, 2014 at 02:50:22AM -0400, Edward Kmett wrote:
> .. whereas I've adopted prefixed comma-lists in Haskell to avoid the
> need for an extension like this one, so it'd be quite a shift in my
> programming style to get to where this helps me.

That also lets me somehow question the whole proposal if you can get
rid of most problems by just changing your coding style:

   module A
      ( a
      , b
      , c
      ) where ...

   data A = A
      { a :: Int
      , b :: Int
      , c :: Int
      }

   abc = [ a
         , b
         , c
         ]


Every such change in ghc has a cost for the whole haskell tool chain, 
and if such change isn't even indicated by an extension, then it will
be even more "fun" for all the haskell tool developers handling this.


Greetings,
Daniel


More information about the ghc-devs mailing list