[project @ 1998-09-30 07:54:48 by sof]
authorsof <unknown>
Wed, 30 Sep 1998 07:54:48 +0000 (07:54 +0000)
committersof <unknown>
Wed, 30 Sep 1998 07:54:48 +0000 (07:54 +0000)
new helper: openAlphaTyVars

ghc/compiler/types/TyVar.lhs

index e0d4178..512912b 100644 (file)
@@ -8,7 +8,7 @@ module TyVar (
         setTyVarFlexi,
        cloneTyVar, nameTyVar,
 
-       openAlphaTyVar,
+       openAlphaTyVar, openAlphaTyVars,
        alphaTyVars, alphaTyVar, betaTyVar, gammaTyVar, deltaTyVar,
 
        -- We also export "environments" keyed off of
@@ -97,6 +97,10 @@ Fixed collection of type variables
        -- result type for "error", so that we can have (error Int# "Help")
 openAlphaTyVar = TyVar initTyVarUnique mkTypeKind Nothing unused
 
+openAlphaTyVars = 
+    [ TyVar u mkTypeKind Nothing unused
+    | u <- iterate incrUnique initTyVarUnique]
+
 alphaTyVars = [ TyVar u mkBoxedTypeKind Nothing unused
              | u <- iterate incrUnique initTyVarUnique]