[Haskell-cafe] Using lenses

Christopher Done chrisdone
Thu Oct 3 15:28:35 UTC 2013


On 3 October 2013 10:57, Roman Cheplyaka <roma at ro-che.info> wrote:
> An interesting use case is my time-lens library.
> http://hackage.haskell.org/package/time-lens-0.3/docs/Data-Time-Lens.html
>
> You can do things like
>
>   >>> modL minutes (+5) (TimeOfDay 16 57 13)
>   17:02:13
>
> But one has to be somewhat lenient about the lens laws here.

Relatedly the thyme package (really fast time implementation) provides
lenses for all its data types:
http://hackage.haskell.org/package/thyme




More information about the Haskell-Cafe mailing list