Use the correct flag for controlling scoped type variables in an instance decl
authorsimonpj@microsoft.com <unknown>
Thu, 21 Jun 2007 14:11:14 +0000 (14:11 +0000)
committersimonpj@microsoft.com <unknown>
Thu, 21 Jun 2007 14:11:14 +0000 (14:11 +0000)
compiler/rename/RnSource.lhs

index 71415fa..028970c 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}
 
 %*********************************************************