GHC support for the new "record" package

Daniel Trstenjak daniel.trstenjak at gmail.com
Sat Jan 24 13:07:05 UTC 2015


Hi Konstantine,

> let bar' = bar{foo{val}=10}

If you're inside a record context you might just have something like:

   let bar' = bar { foo.val = 10 }

and

   let val = bar { foo.val }

or even

   let bar' = bar { foo.val %= someFunction }


This just seems to be some kind of syntactic sugar, so it's most
likely less powerful than real lenses.


Greetings,
Daniel


More information about the ghc-devs mailing list