X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fparser%2FRdrHsSyn.lhs;h=01df302a0e4ed1578b0bd0a9e9a773215823b91d;hb=298a8b8129dd3ef637eb18d5d83d7a752d845598;hp=8d9e17da0187aa432722f8147deb76331a6c6312;hpb=c7b389309e5cdc86db9845573900b560c7a2fa05;p=ghc-hetmet.git diff --git a/ghc/compiler/parser/RdrHsSyn.lhs b/ghc/compiler/parser/RdrHsSyn.lhs index 8d9e17d..01df302 100644 --- a/ghc/compiler/parser/RdrHsSyn.lhs +++ b/ghc/compiler/parser/RdrHsSyn.lhs @@ -160,7 +160,7 @@ mkClassDecl (cxt, cname, tyvars) fds sigs mbinds = ClassDecl { tcdCtxt = cxt, tcdLName = cname, tcdTyVars = tyvars, tcdFDs = fds, tcdSigs = sigs, - tcdMeths = mbinds, + tcdMeths = mbinds } mkTyData new_or_data (context, tname, tyvars) data_cons maybe @@ -385,11 +385,11 @@ getMonoBind (L loc (FunBind lf@(L _ f) inf mtchs)) binds = go mtchs loc binds where go mtchs1 loc1 (L loc2 (ValD (FunBind f2 inf2 mtchs2)) : binds) - | f == unLoc f2 = go (mtchs2 ++ mtchs1) loc binds - -- Remember binds is reversed, so glue mtchs2 on the front - -- and use loc2 as the final location + | f == unLoc f2 = go (mtchs2++mtchs1) loc binds where loc = combineSrcSpans loc1 loc2 - go mtchs1 loc binds = (L loc (FunBind lf inf mtchs1), binds) + go mtchs1 loc binds + = (L loc (FunBind lf inf (reverse mtchs1)), binds) + -- reverse the final matches, to get it back in the right order getMonoBind bind binds = (bind, binds)