• simonpj@microsoft.com's avatar
    Fix Trac #3640, plus associated refactoring · df8b00e0
    simonpj@microsoft.com authored
    In fixing this bug (to do with record puns), I had the usual rush of
    blood to the head, and I did quite a bit of refactoring in the way
    that duplicate/shadowed names are reported.
    I think the result is shorter as well as clearer.
    In one place I found it convenient for the renamer to use the ErrCtxt
    carried in the monad.  (The renamer used not to have such a context,
    but years ago the typechecker and renamer monads became one, so now it
    does.)   So now it's availble if you want it in future.
RnPat.lhs 21.9 KB