diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2011-10-22 12:03:11 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2011-10-22 12:03:11 +0100 |
commit | b653231468f4f166133ca91bc7ca2f5717e5d726 (patch) | |
tree | 6a50d0025389b5be13569b1899e77cbb3351bf4d /compiler/prelude/TysPrim.lhs | |
parent | 3caef68c35b802e140183d2560ec31d3548246e8 (diff) | |
download | haskell-b653231468f4f166133ca91bc7ca2f5717e5d726.tar.gz |
Fix kind-checking for unboxed tuples (fixes Trac #5573)
In particular we don't allow *nested* unboxed tuples, but the
typechecker wasn't actually enforcing that, which confused the
later stages of the compiler.
I also updated the documentation on unboxed tuples.
Diffstat (limited to 'compiler/prelude/TysPrim.lhs')
-rw-r--r-- | compiler/prelude/TysPrim.lhs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/prelude/TysPrim.lhs b/compiler/prelude/TysPrim.lhs index 3f54172ecf..81094acaa1 100644 --- a/compiler/prelude/TysPrim.lhs +++ b/compiler/prelude/TysPrim.lhs @@ -14,7 +14,7 @@ module TysPrim( tyVarList, alphaTyVars, betaTyVars, alphaTyVar, betaTyVar, gammaTyVar, deltaTyVar, alphaTy, betaTy, gammaTy, deltaTy, openAlphaTy, openBetaTy, openAlphaTyVar, openBetaTyVar, openAlphaTyVars, - argAlphaTy, argAlphaTyVar, argBetaTy, argBetaTyVar, + argAlphaTyVars, argAlphaTyVar, argAlphaTy, argBetaTy, argBetaTyVar, -- Kind constructors... tySuperKindTyCon, tySuperKind, @@ -210,8 +210,9 @@ openAlphaTy, openBetaTy :: Type openAlphaTy = mkTyVarTy openAlphaTyVar openBetaTy = mkTyVarTy openBetaTyVar +argAlphaTyVars :: [TyVar] argAlphaTyVar, argBetaTyVar :: TyVar -(argAlphaTyVar : argBetaTyVar : _) = tyVarList argTypeKind +argAlphaTyVars@(argAlphaTyVar : argBetaTyVar : _) = tyVarList argTypeKind argAlphaTy, argBetaTy :: Type argAlphaTy = mkTyVarTy argAlphaTyVar argBetaTy = mkTyVarTy argBetaTyVar |