X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FhsSyn%2FHsCore.lhs;h=0f5a02037073941ce3173300eca51ba5d9fc6726;hb=a63bd8f558fedec86451f36d86833c9afb934ae8;hp=e7af9dc2b8aae381f82c8e30f0863a47b7e341de;hpb=e0d750bedbd33f7a133c8c82c35fd8db537ab649;p=ghc-hetmet.git diff --git a/ghc/compiler/hsSyn/HsCore.lhs b/ghc/compiler/hsSyn/HsCore.lhs index e7af9dc..0f5a020 100644 --- a/ghc/compiler/hsSyn/HsCore.lhs +++ b/ghc/compiler/hsSyn/HsCore.lhs @@ -14,8 +14,8 @@ We could either use this, or parameterise @GenCoreExpr@ on @Types@ and module HsCore ( UfExpr(..), UfAlt, UfBinder(..), UfNote(..), UfBinding(..), UfConAlt(..), - HsIdInfo(..), pprHsIdInfo, - + HsIdInfo(..), pprHsIdInfo, + eq_ufExpr, eq_ufBinders, pprUfExpr, pprHsIdInfo, toUfExpr, toUfBndr, ufBinderName @@ -34,7 +34,7 @@ import HsTypes ( HsType, pprParendHsType, pprHsTyVarBndr, toHsType, import Id ( idArity, idType, isDataConId_maybe, isFCallId_maybe ) import Var ( varType, isId ) import IdInfo ( InlinePragInfo ) -import Name ( Name, NamedThing(..), getName, toRdrName ) +import Name ( Name, NamedThing(..), toRdrName ) import RdrName ( RdrName, rdrNameOcc ) import OccName ( isTvOcc ) import CoreSyn @@ -48,8 +48,9 @@ import Type ( Kind, eqKind ) import BasicTypes ( Arity ) import FiniteMap ( lookupFM ) import CostCentre -import Util ( eqListBy ) +import Util ( eqListBy, lengthIs ) import Outputable +import FastString \end{code} %************************************************************************ @@ -69,7 +70,7 @@ data UfExpr name | UfLet (UfBinding name) (UfExpr name) | UfNote (UfNote name) (UfExpr name) | UfLit Literal - | UfLitLit FAST_STRING (HsType name) + | UfLitLit FastString (HsType name) | UfFCall ForeignCall (HsType name) data UfNote name = UfSCC CostCentre @@ -83,7 +84,7 @@ data UfConAlt name = UfDefault | UfDataAlt name | UfTupleAlt (HsTupCon name) | UfLitAlt Literal - | UfLitLitAlt FAST_STRING (HsType name) + | UfLitLitAlt FastString (HsType name) data UfBinding name = UfNonRec (UfBinder name) @@ -159,7 +160,7 @@ toUfApp (Var v) as -> UfTuple (mk_hs_tup_con tc dc) tup_args where val_args = dropWhile isTypeArg as - saturated = length val_args == idArity v + saturated = val_args `lengthIs` idArity v tup_args = map toUfExpr val_args tc = dataConTyCon dc ;