Re: prefix operators

2010-07-20 Thread Ian Lynagh
On Tue, Jul 13, 2010 at 01:52:36PM +0100, Simon Marlow wrote: Yes, Ian Lynagh implemented your algorithm in GHC (with several tweaks to implement some of the darker corner cases, I believe). There's also -XAlternativeLayoutRuleTransitional but I'm not sure what that does. It adds a

Re: prefix operators

2010-07-13 Thread Christian Maeder
to squizzle around to re-interpret them as prefix operators. Not very cool. Something unified would be a Good Thing. I assume f -x -y = ... is also parsed as (f - x) - y and later rejected as Parse error in pattern. The (possibly) indented interpretation f (-x) (-y) or f (!x) (!y) simply

Re: prefix operators

2010-07-13 Thread Simon Marlow
as prefix operators. Not very cool. Something unified would be a Good Thing. So, after thinking about it some, I think there may be a somewhat elegant solution. I like the sound of it. I put the code for the Haskell 2010 fixity resolver together with a little testing framework in the haskell-prime

Re: prefix operators

2010-07-10 Thread John Meacham
On Fri, Jul 09, 2010 at 09:33:52AM +0100, Simon Marlow wrote: On 08/07/2010 09:45, John Meacham wrote: On Thu, Jul 08, 2010 at 07:09:29AM +, Simon Peyton-Jones wrote: (ie as infix operators) and I have to squizzle around to re-interpret them as prefix operators. Not very cool. Something

Re: prefix operators

2010-07-08 Thread Atze Dijkstra
(ie as infix operators) and I have to squizzle around to re-interpret them as prefix operators. Not very cool. Something unified would be a Good Thing. Simon | -Original Message- | From: haskell-prime-boun...@haskell.org [mailto:haskell-prime- | boun...@haskell.org

Re: prefix operators

2010-07-08 Thread John Meacham
On Thu, Jul 08, 2010 at 07:09:29AM +, Simon Peyton-Jones wrote: (ie as infix operators) and I have to squizzle around to re-interpret them as prefix operators. Not very cool. Something unified would be a Good Thing. So, after thinking about it some, I think there may be a somewhat

prefix operators

2010-07-07 Thread John Meacham
It occurred to me the other day that Haskell (w/ bang patterns) now has 3 prefix operators, all of which are defined independently and follow their own special rules for parsing. we have (-), (!) and (~). It would seem to me that we should somehow be able to unify the mechanism behind parsing