diff options
Diffstat (limited to 'compiler/prelude')
| -rw-r--r-- | compiler/prelude/PrelNames.hs | 11 | ||||
| -rw-r--r-- | compiler/prelude/TysWiredIn.hs | 89 | 
2 files changed, 1 insertions, 99 deletions
diff --git a/compiler/prelude/PrelNames.hs b/compiler/prelude/PrelNames.hs index fd324cb43e..88541120ca 100644 --- a/compiler/prelude/PrelNames.hs +++ b/compiler/prelude/PrelNames.hs @@ -543,9 +543,6 @@ dATA_TYPE_EQUALITY = mkBaseModule (fsLit "Data.Type.Equality")  dATA_COERCE     = mkBaseModule (fsLit "Data.Coerce")  dEBUG_TRACE     = mkBaseModule (fsLit "Debug.Trace") -gHC_PARR' :: Module -gHC_PARR' = mkBaseModule (fsLit "GHC.PArr") -  gHC_SRCLOC :: Module  gHC_SRCLOC = mkBaseModule (fsLit "GHC.SrcLoc") @@ -1744,10 +1741,6 @@ funPtrTyConKey                          = mkPreludeTyConUnique 76  tVarPrimTyConKey                        = mkPreludeTyConUnique 77  compactPrimTyConKey                     = mkPreludeTyConUnique 78 --- Parallel array type constructor -parrTyConKey :: Unique -parrTyConKey                            = mkPreludeTyConUnique 82 -  -- dotnet interop  objectTyConKey :: Unique  objectTyConKey                          = mkPreludeTyConUnique 83 @@ -1938,10 +1931,6 @@ inlDataConKey                           = mkPreludeDataConUnique 21  inrDataConKey                           = mkPreludeDataConUnique 22  genUnitDataConKey                       = mkPreludeDataConUnique 23 --- Data constructor for parallel arrays -parrDataConKey :: Unique -parrDataConKey                          = mkPreludeDataConUnique 24 -  leftDataConKey, rightDataConKey :: Unique  leftDataConKey                          = mkPreludeDataConUnique 25  rightDataConKey                         = mkPreludeDataConUnique 26 diff --git a/compiler/prelude/TysWiredIn.hs b/compiler/prelude/TysWiredIn.hs index 72c24edc3c..0817a75898 100644 --- a/compiler/prelude/TysWiredIn.hs +++ b/compiler/prelude/TysWiredIn.hs @@ -95,11 +95,6 @@ module TysWiredIn (          unicodeStarKindTyCon, unicodeStarKindTyConName,          liftedTypeKindTyCon, constraintKindTyCon, -        -- * Parallel arrays -        mkPArrTy, -        parrTyCon, parrFakeCon, isPArrTyCon, isPArrFakeCon, -        parrTyCon_RDR, parrTyConName, -          -- * Equality predicates          heqTyCon, heqClass, heqDataCon,          coercibleTyCon, coercibleTyConName, coercibleDataCon, coercibleClass, @@ -220,7 +215,6 @@ wiredInTyCons = [ -- Units are not treated like other tuples, because then                  , word8TyCon                  , listTyCon                  , maybeTyCon -                , parrTyCon                  , heqTyCon                  , coercibleTyCon                  , typeNatKindCon @@ -445,14 +439,8 @@ vecElemDataConNames = zipWith3Lazy mk_special_dc_name  mk_special_dc_name :: FastString -> Unique -> DataCon -> Name  mk_special_dc_name fs u dc = mkWiredInDataConName UserSyntax gHC_TYPES fs u dc -parrTyConName, parrDataConName :: Name -parrTyConName   = mkWiredInTyConName   BuiltInSyntax -                    gHC_PARR' (fsLit "[::]") parrTyConKey parrTyCon -parrDataConName = mkWiredInDataConName UserSyntax -                    gHC_PARR' (fsLit "PArr") parrDataConKey parrDataCon -  boolTyCon_RDR, false_RDR, true_RDR, intTyCon_RDR, charTyCon_RDR, -    intDataCon_RDR, listTyCon_RDR, consDataCon_RDR, parrTyCon_RDR :: RdrName +    intDataCon_RDR, listTyCon_RDR, consDataCon_RDR :: RdrName  boolTyCon_RDR   = nameRdrName boolTyConName  false_RDR       = nameRdrName falseDataConName  true_RDR        = nameRdrName trueDataConName @@ -461,7 +449,6 @@ charTyCon_RDR   = nameRdrName charTyConName  intDataCon_RDR  = nameRdrName intDataConName  listTyCon_RDR   = nameRdrName listTyConName  consDataCon_RDR = nameRdrName consDataConName -parrTyCon_RDR   = nameRdrName parrTyConName  {-  ************************************************************************ @@ -692,8 +679,6 @@ isBuiltInOcc_maybe occ =        "[]" -> Just $ choose_ns listTyConName nilDataConName        ":"    -> Just consDataConName -      "[::]" -> Just parrTyConName -        -- boxed tuple data/tycon        "()"    -> Just $ tup_name Boxed 0        _ | Just rest <- "(" `BS.stripPrefix` name @@ -1518,78 +1503,6 @@ mkSumTy :: [Type] -> Type  mkSumTy tys = mkTyConApp (sumTyCon (length tys))                           (map getRuntimeRep tys ++ tys) -{- ********************************************************************* -*                                                                      * -        The parallel-array type,  [::] -*                                                                      * -************************************************************************ - -Special syntax for parallel arrays needs some wired in definitions. --} - --- | Construct a type representing the application of the parallel array constructor -mkPArrTy    :: Type -> Type -mkPArrTy ty  = mkTyConApp parrTyCon [ty] - --- | Represents the type constructor of parallel arrays --- ---  * This must match the definition in @PrelPArr@ --- --- NB: Although the constructor is given here, it will not be accessible in ---     user code as it is not in the environment of any compiled module except ---     @PrelPArr@. --- -parrTyCon :: TyCon -parrTyCon  = pcTyCon parrTyConName Nothing alpha_tyvar [parrDataCon] - -parrDataCon :: DataCon -parrDataCon  = pcDataCon -                 parrDataConName -                 alpha_tyvar            -- forall'ed type variables -                 [intTy,                -- 1st argument: Int -                  mkTyConApp            -- 2nd argument: Array# a -                    arrayPrimTyCon -                    alpha_ty] -                 parrTyCon - --- | Check whether a type constructor is the constructor for parallel arrays -isPArrTyCon    :: TyCon -> Bool -isPArrTyCon tc  = tyConName tc == parrTyConName - --- | Fake array constructors --- --- * These constructors are never really used to represent array values; ---   however, they are very convenient during desugaring (and, in particular, ---   in the pattern matching compiler) to treat array pattern just like ---   yet another constructor pattern --- -parrFakeCon                        :: Arity -> DataCon -parrFakeCon i | i > mAX_TUPLE_SIZE  = mkPArrFakeCon  i  -- build one specially -parrFakeCon i                       = parrFakeConArr!i - --- pre-defined set of constructors --- -parrFakeConArr :: Array Int DataCon -parrFakeConArr  = array (0, mAX_TUPLE_SIZE) [(i, mkPArrFakeCon i) -                                            | i <- [0..mAX_TUPLE_SIZE]] - --- build a fake parallel array constructor for the given arity --- -mkPArrFakeCon       :: Int -> DataCon -mkPArrFakeCon arity  = data_con -  where -        data_con  = pcDataCon name [tyvar] tyvarTys parrTyCon -        tyvar     = head alphaTyVars -        tyvarTys  = replicate arity $ mkTyVarTy tyvar -        nameStr   = mkFastString ("MkPArr" ++ show arity) -        name      = mkWiredInName gHC_PARR' (mkDataOccFS nameStr) unique -                                  (AConLike (RealDataCon data_con)) UserSyntax -        unique      = mkPArrDataConUnique arity - --- | Checks whether a data constructor is a fake constructor for parallel arrays -isPArrFakeCon      :: DataCon -> Bool -isPArrFakeCon dcon  = dcon == parrFakeCon (dataConSourceArity dcon) -  -- Promoted Booleans  promotedFalseDataCon, promotedTrueDataCon :: TyCon  | 
