diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-08-15 15:59:26 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-08-15 15:59:26 +0100 |
commit | bdce8f0a3b40a60108a99b4635d168c12b79f255 (patch) | |
tree | 42b41ee4198a8145d2e66054fdee3f36f28784f8 /compiler/coreSyn | |
parent | c848891acfc7059a6ef19c80ec7958c26e1327fe (diff) | |
download | haskell-bdce8f0a3b40a60108a99b4635d168c12b79f255.tar.gz |
Put kind variables before type variables when quantifying
This is a pretty egregious error; I'm surprised it has lasted so long!
Fixes Trac #7124
Diffstat (limited to 'compiler/coreSyn')
-rw-r--r-- | compiler/coreSyn/MkCore.lhs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/coreSyn/MkCore.lhs b/compiler/coreSyn/MkCore.lhs index 3a696d1914..0857cd556e 100644 --- a/compiler/coreSyn/MkCore.lhs +++ b/compiler/coreSyn/MkCore.lhs @@ -102,14 +102,14 @@ infixl 4 `mkCoreApp`, `mkCoreApps` \begin{code} sortQuantVars :: [Var] -> [Var] -- Sort the variables (KindVars, TypeVars, and Ids) --- into order: Type, then Kind, then Id +-- into order: Kind, then Type, then Id sortQuantVars = sortBy (comparing withCategory) where withCategory v = (category v, v) category :: Var -> Int category v - | isTyVar v = 1 - | isKindVar v = 2 + | isKindVar v = 1 + | isTyVar v = 2 | otherwise = 3 -- | Bind a binding group over an expression, using a @let@ or @case@ as |