Both (>=) and (-) belong to classes defined in PreludeCore,
and hence cannot be rebound.  This was a deliberate decision,
made in order to turn your point into a non-problem.

Long live (n+k)!  -- P

----- Begin Included Message -----

>From [EMAIL PROTECTED] Mon May 17 21:33:41 1993
From: Lennart Augustsson <[EMAIL PROTECTED]>
Subject: n+k patterns
Date: Mon, 17 May 93 22:25:03 +0200

Could those in charge of the formal semantics of Haskell (yes,
that's you folks in Glasgow!) tell me what the meaning of n+k patterns

In the report it says that

        case e0 of { x+k -> e; _ -> e' }

translates to

        if e0 >= k then { let { x' = e0-k } in e[x'/x] else e'

Which >= and - does this refer to?

What if they have been locally rebound?  E.g.

        let x - y = x ++ f y
                where f 0 = []
                      f (n+1) = f n
        in  [] - 0

Does the translated - still refer to the method in PreludeCore or
to the - in scope?

        -- Lennart

PS. I'd like to start the "Ban n+k patterns"-movement, any followers?

----- End Included Message -----

Reply via email to