GHC support for the new "record" package

Edward Kmett ekmett at gmail.com
Thu Jan 22 21:07:38 UTC 2015


On Thu, Jan 22, 2015 at 4:31 AM, Adam Gundry <adam at well-typed.com> wrote:

> Actually, the simplifications I recently came up with could allow us to
> make uses of the field work as van Laarhoven lenses, other lenses *and*
> selector functions. In practice, however, I suspect this might lead to
> somewhat confusing error messages, so it might not be desirable.


Interesting. Have you actually tried this with a composition of your
simplified form, because I don't see how that can work.

When we tried this before we showed that there was a fundamental limitation
in the way the functional dependencies had to flow information down the
chain, also, "foo.bar.baz" has very different interpretations, between the
lens and normal accessors, and both are producing functions, so its hard to
see how this doesn't yield overlapping instance hell.

-Edward
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20150122/a64c627e/attachment.html>


More information about the ghc-devs mailing list