Print infix function definitions correctly in HsSyn
[ghc-hetmet.git] / compiler / rename / RnSource.lhs
index 71415fa..59ca11b 100644 (file)
@@ -378,11 +378,11 @@ type variable environment iff -fglasgow-exts
 
 \begin{code}
 extendTyVarEnvForMethodBinds tyvars thing_inside
-  = doptM Opt_GlasgowExts                      `thenM` \ opt_GlasgowExts ->
-    if opt_GlasgowExts then
-       extendTyVarEnvFVRn (map hsLTyVarName tyvars) thing_inside
-    else
-       thing_inside
+  = do { scoped_tvs <- doptM Opt_ScopedTypeVariables
+       ; if scoped_tvs then
+               extendTyVarEnvFVRn (map hsLTyVarName tyvars) thing_inside
+         else
+               thing_inside }
 \end{code}
 
 %*********************************************************
@@ -770,7 +770,6 @@ rnConDeclDetails doc (RecCon fields)
        ; new_fields <- mappM (rnField doc) fields
        ; return (RecCon new_fields) }
 
--- Document comments are renamed to Nothing here
 rnField doc (ConDeclField name ty haddock_doc)
   = lookupLocatedTopBndrRn name        `thenM` \ new_name ->
     rnLHsType doc ty           `thenM` \ new_ty ->