X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypes%2FGenerics.lhs;fp=ghc%2Fcompiler%2Ftypes%2FGenerics.lhs;h=3a596e774f124e7f282e2e5cc3e17aa2373e29ec;hb=9af77fa423926fbda946b31e174173d0ec5ebac8;hp=197fb2d4f6baca0a3195c5fe27ab9b74ca8cceb1;hpb=69e55e7476392a2b59b243a32065350c258d4970;p=ghc-hetmet.git diff --git a/ghc/compiler/types/Generics.lhs b/ghc/compiler/types/Generics.lhs index 197fb2d..3a596e7 100644 --- a/ghc/compiler/types/Generics.lhs +++ b/ghc/compiler/types/Generics.lhs @@ -5,7 +5,7 @@ module Generics ( mkTyConGenInfo, mkGenericRhs, import RnHsSyn ( RenamedHsExpr ) -import HsSyn ( HsExpr(..), InPat(..), mkSimpleMatch, placeHolderType ) +import HsSyn ( HsExpr(..), Pat(..), mkSimpleMatch, placeHolderType ) import Type ( Type, isUnLiftedType, tyVarsOfType, tyVarsOfTypes, mkTyVarTys, mkForAllTys, mkTyConApp, @@ -35,7 +35,7 @@ import IdInfo ( noCafIdInfo, setUnfoldingInfo, setArityInfo ) import CoreUnfold ( mkTopUnfolding ) import Maybe ( isNothing ) -import SrcLoc ( builtinSrcLoc ) +import SrcLoc ( noSrcLoc ) import Unique ( Unique, builtinUniques, mkBuiltinUnique ) import Util ( takeList, dropList ) import Outputable @@ -541,8 +541,8 @@ bimapApp env (Just (tycon, ty_args)) ------------------- -- bimapArrow :: [EP a a', EP b b'] -> EP (a->b) (a'->b') bimapArrow [ep1, ep2] - = EP { fromEP = mk_hs_lam [VarPatIn g1, VarPatIn g2] from_body, - toEP = mk_hs_lam [VarPatIn g1, VarPatIn g2] to_body } + = EP { fromEP = mk_hs_lam [VarPat g1, VarPat g2] from_body, + toEP = mk_hs_lam [VarPat g1, VarPat g2] to_body } where from_body = fromEP ep2 `HsApp` (HsPar $ HsVar g1 `HsApp` (HsPar $ toEP ep1 `HsApp` HsVar g2)) to_body = toEP ep2 `HsApp` (HsPar $ HsVar g1 `HsApp` (HsPar $ fromEP ep1 `HsApp` HsVar g2)) @@ -553,7 +553,7 @@ bimapTuple eps toEP = mk_hs_lam [tuple_pat] to_body } where names = takeList eps genericNames - tuple_pat = TuplePatIn (map VarPatIn names) Boxed + tuple_pat = TuplePat (map VarPat names) Boxed eps_w_names = eps `zip` names to_body = ExplicitTuple [toEP ep `HsApp` HsVar g | (ep,g) <- eps_w_names] Boxed from_body = ExplicitTuple [fromEP ep `HsApp` HsVar g | (ep,g) <- eps_w_names] Boxed @@ -563,10 +563,10 @@ genericNames :: [Name] genericNames = [mkSystemName (mkBuiltinUnique i) (mkFastString ('g' : show i)) | i <- [1..]] (g1:g2:g3:_) = genericNames -mk_hs_lam pats body = HsPar (HsLam (mkSimpleMatch pats body placeHolderType builtinSrcLoc)) +mk_hs_lam pats body = HsPar (HsLam (mkSimpleMatch pats body placeHolderType noSrcLoc)) idEP :: EP RenamedHsExpr idEP = EP idexpr idexpr where - idexpr = mk_hs_lam [VarPatIn g3] (HsVar g3) + idexpr = mk_hs_lam [VarPat g3] (HsVar g3) \end{code}