X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypes%2FCoercion.lhs;h=672deae68be2163872948f37a7d084f5d69dac93;hp=ca1b1a68154fc88a18206d3dcf7e260e8fd9987e;hb=ab22f4e6456820c1b5169d75f5975a94e61f54ce;hpb=6b4592943b799175dec4549882bbf06fa87a0739 diff --git a/compiler/types/Coercion.lhs b/compiler/types/Coercion.lhs index ca1b1a6..672deae 100644 --- a/compiler/types/Coercion.lhs +++ b/compiler/types/Coercion.lhs @@ -1,5 +1,8 @@ +% +% (c) The University of Glasgow 2006 +% - Module for type coercions, as in System FC. +Module for type coercions, as in System FC. Coercions are represented as types, and their kinds tell what types the coercion works on. @@ -34,29 +37,18 @@ module Coercion ( #include "HsVersions.h" import TypeRep -import Type ( Type, Kind, PredType, substTyWith, mkAppTy, mkForAllTy, - mkFunTy, splitAppTy_maybe, splitForAllTy_maybe, coreView, - kindView, mkTyConApp, isCoercionKind, isEqPred, mkAppTys, - coreEqType, splitAppTys, isTyVarTy, splitTyConApp_maybe - ) -import TyCon ( TyCon, tyConArity, mkCoercionTyCon, isClosedNewTyCon, - newTyConRhs, newTyConCo_maybe, - isCoercionTyCon, isCoercionTyCon_maybe ) -import Var ( Var, TyVar, isTyVar, tyVarKind ) -import Name ( BuiltInSyntax(..), Name, mkWiredInName, tcName ) -import OccName ( mkOccNameFS ) -import PrelNames ( symCoercionTyConKey, - transCoercionTyConKey, leftCoercionTyConKey, - rightCoercionTyConKey, instCoercionTyConKey, - unsafeCoercionTyConKey, gHC_PRIM - ) -import Util ( lengthIs, snocView ) -import Unique ( hasKey ) -import BasicTypes ( Arity ) +import Type +import TyCon +import Var hiding (isCoVar) +import Name +import OccName +import PrelNames +import Util +import Unique +import BasicTypes import Outputable - ------------------------------ decomposeCo :: Arity -> Coercion -> [Coercion] -- (decomposeCo 3 c) = [right (left (left c)), right (left c), right c]