Types for Data.Sequence pattern synonyms
Brent Yorgey
byorgey at gmail.com
Mon Apr 25 20:39:37 UTC 2016
Very +1 for only exporting Seq-specific ones from Data.Sequence.
On Wed, Apr 20, 2016 at 4:49 PM Ivan Lazar Miljenovic <
ivan.miljenovic at gmail.com> wrote:
> On 21 April 2016 at 02:55, Henning Thielemann
> <lemming at henning-thielemann.de> wrote:
> >
> > On Wed, 20 Apr 2016, David Feuer wrote:
> >
> >> As discussed, I plan to add pattern synonyms Empty, :<|, and :|> to
> >> make working with sequences more convenient. The remaining question is
> >> what types they should have. From the Data.Sequence standpoint, the
> >> best thing would be to make them work *only* for Seq, so that the Seq
> >> type will be inferred from their use. However, modules using multiple
> >> sequence types might benefit from more flexibility, via ad hoc
> >> classes.
> >
> >
> > I prefer that Data.Sequence exports functions with the Seq type and that
> > generalized functions are exported by a different module that is intended
> > for generalization. The specific and general infix operators could have
> the
> > same symbol and the user could choose via the module import which one to
> > use.
>
> +1
>
> --
> Ivan Lazar Miljenovic
> Ivan.Miljenovic at gmail.com
> http://IvanMiljenovic.wordpress.com
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20160425/ef7c0947/attachment.html>
More information about the Libraries
mailing list