Fractional/negative fixity?

Claus Reinke claus.reinke at talk21.com
Tue Nov 7 21:09:59 EST 2006


by all means, lets have warm fuzzy precedence declarations

    infix(nearly right) (exp (2*i*pi) + 1) :-)
    infix(mostly left) (((\x->cos x + i*(sin x)) (2*pi)) + 1) (-:

who says that all the fun has to start in the type system?-)

we would probably need to refer to hyperreals, in order to
introduce infinitesimal differences between real precedence levels?

oh, and let us not forget the early Basic's contribution to language
design: renum (who could ever to without it!-)


ah well, to justify the use of bandwith (and because you should 
never let your design decisions be influenced by someone making
fun of any of the suggestions):

- absolute numbers for operator precedence are a hack that
    reminds me strongly of my Basic times: I used steps of 100
    starting with 1000 for line numbers, I used renum to make
    space for additions or to clean up (was that refactoring?-), 
    but I was still happy to leave all that nonsense behind!

- googling for "operator precedence relative" suggests that some
    parser generators already use something other that absolute
    preferences

- prolog has more precedence levels, as well as simple declarations
    for pre- and postfix operators (fx, xf)

sorry, I just couldn't resist any more;-)
claus

--
unsagePerformIO:
    some things are just not wise to do





More information about the Haskell-prime mailing list