yesodweb/yesod — pull request #828 by jcristovao (2014-09-17 17:19:06+00:00)
Title: Added convertField function to ease the generation of new fields

Hi,

I am not sure if this would be useful to someone else, or if there is a better way to achieve this... if so, please let me know. But I did stumble on the fact that a Field cannot be a functor, and therefore there is no easy way to manipulate the outcome type.

This uses the general idea of the [newtype package](https://hackage.haskell.org/package/newtype-0.2/docs/Control-Newtype.html), but without adding new dependencies. You just have to provide the 'back and forth' convertion functions. [ISOs](https://hackage.haskell.org/package/lens-3.9.2/docs/Control-Lens-Iso.html) as E.Kmett would call them.

What do you think?