\section{@Vars@: Variables}
\begin{code}
-{-# OPTIONS_GHC -w #-}
+{-# OPTIONS -w #-}
-- The above warning supression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and fix
-- any warnings in the module. See
--- http://hackage.haskell.org/trac/ghc/wiki/WorkingConventions#Warnings
+-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
-- for details
module Var (
import {-# SOURCE #-} TcType( TcTyVarDetails, pprTcTyVarDetails )
import {-# SOURCE #-} IdInfo( GlobalIdDetails, notGlobalId,
IdInfo, seqIdInfo )
-#ifdef DEBUG
import {-# SOURCE #-} TypeRep( isCoercionKind )
-#endif
import Name hiding (varName)
import Unique
mkCoVar :: Name -> Kind -> CoVar
mkCoVar name kind = ASSERT( isCoercionKind kind )
- TyVar { varName = name
- , realUnique = getKey# (nameUnique name)
- , varType = kind
- , isCoercionVar = True
+ TyVar { varName = name
+ , realUnique = getKey# (nameUnique name)
+ , varType = kind
+ -- varType is always PredTy (EqPred t1 t2)
+ , isCoercionVar = True
}
mkWildCoVar :: Kind -> TyVar