GHC support for the new "record" package

Dan Doel dan.doel at gmail.com
Wed Jan 28 00:26:52 UTC 2015


On Tue, Jan 27, 2015 at 6:47 PM, Edward Kmett <ekmett at gmail.com> wrote:

>
> This works great for lenses that don't let you change types.
>

​This is not the only restriction required for this to be an acceptable
solution.

As soon as you have a distinct Lens type, and use something Category-like
for composition, you are limiting yourself to composing two lenses to get
back a lens (barring a terrible mptc 'solution'). And that is weak. The
only reason I (personally) think lens pulls its weight, and is worth using
(unlike every prior lens library, which I never bothered with), is the
ability for lenses, prisms, ismorphisms, traversals, folds, etc. to
properly degrade to one another and compose automatically. So if we're
settling on a nominal Lens type in a proposal, then it is automatically
only good for one thing to me: defining values of the better lens type.​

-- Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20150127/836a6064/attachment.html>


More information about the ghc-devs mailing list