On Sat, Feb 8, 2014 at 8:23 PM, Gabriel Gonzalez <[email protected]> wrote: > There is one issue here that I forgot to mention. Lenses really mess with > type errors, even if you always just use `view`.
This is a strong argument. That error message must be useless to most users; we should avoid it. Maybe we can split our libraries into, say, `Pipes.Binary` and `Pipes.Binary.Lens`, so that we don't users to two different APIs in the same module. The `lens` package tends to extend other modules with additional lens-like constructs following this same pattern, so we would be following a common practice. For example, `lens` extends `Data.Aeson` in `Data.Aeson.Lens`, or `Data.Text` in `Data.Text.Lens`. I don't think we can go completely “lensless” in our exports, as we would need to encourage users to write functions such as `_encode` here themselves: https://github.com/k0001/pipes-binary/blob/db995790193ce944689863a5b4c07d0449158a59/src/Pipes/Binary.hs#L170 Regards, Renzo Carbonara. -- You received this message because you are subscribed to the Google Groups "Haskell Pipes" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
