X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Frename%2FRnExpr.lhs;h=08b176386e8af258bf9c7be426351dc8f260ad48;hb=f7ecf7234c224489be8a5e63fced903b655d92ee;hp=5f6790e117823990b9d7eb35c5f9d698d8ed403b;hpb=68afb16743cafd5b7495771d359891c6dfc5a186;p=ghc-hetmet.git diff --git a/ghc/compiler/rename/RnExpr.lhs b/ghc/compiler/rename/RnExpr.lhs index 5f6790e..08b1763 100644 --- a/ghc/compiler/rename/RnExpr.lhs +++ b/ghc/compiler/rename/RnExpr.lhs @@ -5,7 +5,7 @@ Basically dependency analysis. -Handles @Match@, @GRHSsAndBinds@, @HsExpr@, and @Qual@ datatypes. In +Handles @Match@, @GRHSsAndBinds@, @HsExpr@, and @Qualifier@ datatypes. In general, all of these functions return a renamed thing, and a set of free variables. @@ -17,8 +17,8 @@ module RnExpr ( checkPrecMatch ) where -import Ubiq -import RnLoop -- break the RnPass/RnExpr/RnBinds loops +IMP_Ubiq() +IMPORT_DELOOPER(RnLoop) -- break the RnPass/RnExpr/RnBinds loops import HsSyn import RdrHsSyn @@ -28,10 +28,10 @@ import RnMonad import ErrUtils ( addErrLoc, addShortErrLocLine ) import Name ( isLocallyDefinedName, pprSym, Name, RdrName ) import Pretty -import UniqFM ( lookupUFM, ufmToList{-ToDo:rm-} ) +import UniqFM ( lookupUFM{-, ufmToList ToDo:rm-} ) import UniqSet ( emptyUniqSet, unitUniqSet, unionUniqSets, unionManyUniqSets, - UniqSet(..) + SYN_IE(UniqSet) ) import Util ( Ord3(..), removeDups, panic ) \end{code} @@ -228,8 +228,8 @@ rnExpr (OpApp e1 op e2) rnExpr (NegApp e n) = rnExpr e `thenRn` \ (e', fvs_e) -> - lookupValue n `thenRn` \ nname -> - returnRn (NegApp e' nname, fvs_e `unionUniqSets` fv_set nname) + rnExpr n `thenRn` \ (n', fvs_n) -> + returnRn (NegApp e' n', fvs_e `unionUniqSets` fvs_n) rnExpr (HsPar e) = rnExpr e `thenRn` \ (e', fvs_e) -> @@ -369,7 +369,7 @@ rnRpats rpats %************************************************************************ %* * -\subsubsection{@Qual@s: in list comprehensions} +\subsubsection{@Qualifier@s: in list comprehensions} %* * %************************************************************************ @@ -487,7 +487,7 @@ precParseExpr exp@(OpApp (OpApp e11 (HsVar op1) e12) (HsVar op) e2) = lookupFixity op `thenRn` \ (op_fix, op_prec) -> lookupFixity op1 `thenRn` \ (op1_fix, op1_prec) -> -- pprTrace "precParse:" (ppCat [ppr PprDebug op, ppInt op_prec, ppr PprDebug op1, ppInt op1_prec]) $ - case cmp op1_prec op_prec of + case (op1_prec `cmp` op_prec) of LT_ -> rearrange EQ_ -> case (op1_fix, op_fix) of (INFIXR, INFIXR) -> rearrange @@ -515,7 +515,7 @@ precParsePat pat@(ConOpPatIn (NegPatIn e1) op e2) precParsePat pat@(ConOpPatIn (ConOpPatIn p11 op1 p12) op p2) = lookupFixity op `thenRn` \ (op_fix, op_prec) -> lookupFixity op1 `thenRn` \ (op1_fix, op1_prec) -> - case cmp op1_prec op_prec of + case (op1_prec `cmp` op_prec) of LT_ -> rearrange EQ_ -> case (op1_fix, op_fix) of (INFIXR, INFIXR) -> rearrange