Record Puns/Wildcards

Ben Franksen ben.franksen at online.de
Wed Feb 25 02:05:40 UTC 2015


I just noted that code like

my_config = default_config {..} where
  name = "my project"
  description = "some longer text"

gives me a syntax error, even if I have NamedFieldPuns and RecordWildCards 
extensions enabled. It seems that these extensions only work for record 
constructors and not for updating values.

Is there a special reason puns/wildcards are not allowed in record updates?

Cheers
Ben
-- 
"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies and the other
way is to make it so complicated that there are no obvious deficiencies.
The first method is far more difficult."   ― C.A.R. Hoare




More information about the Glasgow-haskell-users mailing list