Bang patterns

Edward Kmett ekmett at gmail.com
Tue Feb 5 01:26:16 CET 2013


If space sensitivity or () disambiguation is being used on !, could one of
these also be permitted on ~ to permit it as a valid infix term-level
operator?

That would be an amazingly valuable symbol to be able to reclaim for the
term level for equivalences, and for folks who come from other languages
where it is used like liftA2 (,) in parsing libraries, etc.

-Edward

On Mon, Feb 4, 2013 at 6:42 PM, Ian Lynagh <ian at well-typed.com> wrote:

> On Mon, Feb 04, 2013 at 10:37:44PM +0000, Simon Peyton-Jones wrote:
> >
> > I don't have a strong opinion about whether
> >       f ! x y ! z = e
> > should mean the same; ie whether the space is significant.   I think
> it's probably more confusing if the space is significant (so its presence
> or absence makes a difference).
>
> I also don't feel strongly, although I lean the other way:
>
> I don't think anyone writes "f ! x" when they mean "f with a strict
> argument x", and I don't see any particular advantage in allowing it.
> In fact, I think writing that is less clear than "f !x", so there is an
> advantage in disallowing it.
>
> It also means that existing code that defines a (!) operator in infix
> style would continue to work, provided it puts whitespace around the !.
>
>
> Thanks
> Ian
>
>
> _______________________________________________
> Haskell-prime mailing list
> Haskell-prime at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-prime
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-prime/attachments/20130204/a70fb8c1/attachment.htm>


More information about the Haskell-prime mailing list