[commit: ghc] master: Put kind variables before type variables when quantifying (bdce8f0)
Simon Peyton Jones
simonpj at microsoft.com
Wed Aug 15 17:02:16 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/bdce8f0a3b40a60108a99b4635d168c12b79f255
>---------------------------------------------------------------
commit bdce8f0a3b40a60108a99b4635d168c12b79f255
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Aug 15 15:59:26 2012 +0100
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
>---------------------------------------------------------------
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 3a696d1..0857cd5 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
More information about the Cvs-ghc
mailing list