diff options
-rw-r--r-- | compiler/GHC/Builtin/Types/Prim.hs | 1 | ||||
-rw-r--r-- | compiler/GHC/Builtin/Utils.hs | 7 | ||||
-rw-r--r-- | compiler/GHC/Core/Type.hs | 8 | ||||
-rw-r--r-- | compiler/GHC/Core/Utils.hs | 3 | ||||
-rw-r--r-- | compiler/GHC/Driver/Session.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Hs/ImpExp.hs | 3 | ||||
-rw-r--r-- | compiler/GHC/Tc/Gen/Head.hs | 6 | ||||
-rw-r--r-- | compiler/GHC/Tc/Instance/Typeable.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Types/Id.hs | 10 | ||||
-rw-r--r-- | testsuite/tests/concurrent/prog001/Arithmetic.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/concurrent/prog001/Converter.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/concurrent/prog001/Thread.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/concurrent/prog001/Trit.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/concurrent/prog001/Utilities.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/concurrent/prog001/all.T | 2 |
15 files changed, 24 insertions, 30 deletions
diff --git a/compiler/GHC/Builtin/Types/Prim.hs b/compiler/GHC/Builtin/Types/Prim.hs index e930b58b36..ed1f10a382 100644 --- a/compiler/GHC/Builtin/Types/Prim.hs +++ b/compiler/GHC/Builtin/Types/Prim.hs @@ -190,6 +190,7 @@ exposedPrimTyCons , word64PrimTyCon , tYPETyCon + , funTyCon #include "primop-vector-tycons.hs-incl" ] diff --git a/compiler/GHC/Builtin/Utils.hs b/compiler/GHC/Builtin/Utils.hs index bed98838fb..3aeac609d9 100644 --- a/compiler/GHC/Builtin/Utils.hs +++ b/compiler/GHC/Builtin/Utils.hs @@ -133,8 +133,7 @@ knownKeyNames -- See Note [One-tuples] (Wrinkle: Make boxed one-tuple names have known keys) -- in GHC.Builtin.Types. tupleTyConName BoxedTuple 1 : tupleDataConName Boxed 1 : - concat [ wired_tycon_kk_names funTyCon - , concatMap wired_tycon_kk_names primTyCons + concat [ concatMap wired_tycon_kk_names primTyCons , concatMap wired_tycon_kk_names wiredInTyCons , concatMap wired_tycon_kk_names typeNatTyCons , map idName wiredInIds @@ -264,14 +263,14 @@ ghcPrimExports = map (avail . idName) ghcPrimIds ++ map (avail . idName . primOpId) allThePrimOps ++ [ AvailTC n [n] [] - | tc <- funTyCon : exposedPrimTyCons, let n = tyConName tc ] + | tc <- exposedPrimTyCons, let n = tyConName tc ] ghcPrimDeclDocs :: DeclDocMap ghcPrimDeclDocs = DeclDocMap $ Map.fromList $ mapMaybe findName primOpDocs where names = map idName ghcPrimIds ++ map (idName . primOpId) allThePrimOps ++ - map tyConName (funTyCon : exposedPrimTyCons) + map tyConName exposedPrimTyCons findName (nameStr, doc) | Just name <- find ((nameStr ==) . getOccString) names = Just (name, mkHsDocString doc) diff --git a/compiler/GHC/Core/Type.hs b/compiler/GHC/Core/Type.hs index 4c9bc19a7d..6e612f6e1f 100644 --- a/compiler/GHC/Core/Type.hs +++ b/compiler/GHC/Core/Type.hs @@ -81,7 +81,6 @@ module GHC.Core.Type ( filterOutInvisibleTypes, filterOutInferredTypes, partitionInvisibleTypes, partitionInvisibles, tyConArgFlags, appTyArgFlags, - synTyConResKind, -- ** Analyzing types TyCoMapper(..), mapTyCo, mapTyCoX, @@ -2891,13 +2890,6 @@ tyConsOfType ty go_tc tc = unitUniqSet tc go_ax ax = go_tc $ coAxiomTyCon ax --- | Find the result 'Kind' of a type synonym, --- after applying it to its 'arity' number of type variables --- Actually this function works fine on data types too, --- but they'd always return '*', so we never need to ask -synTyConResKind :: TyCon -> Kind -synTyConResKind tycon = piResultTys (tyConKind tycon) (mkTyVarTys (tyConTyVars tycon)) - -- | Retrieve the free variables in this type, splitting them based -- on whether they are used visibly or invisibly. Invisible ones come -- first. diff --git a/compiler/GHC/Core/Utils.hs b/compiler/GHC/Core/Utils.hs index 0193c5e43d..076d5213d9 100644 --- a/compiler/GHC/Core/Utils.hs +++ b/compiler/GHC/Core/Utils.hs @@ -97,7 +97,6 @@ import GHC.Core.Multiplicity import GHC.Types.Unique import GHC.Utils.Outputable import GHC.Utils.Panic -import GHC.Builtin.Types.Prim import GHC.Data.FastString import GHC.Data.Maybe import GHC.Data.List.SetOps( minusList ) @@ -139,7 +138,7 @@ exprType e@(App _ _) = case collectArgs e of (fun, args) -> applyTypeToArgs e (exprType fun) args -exprType other = pprTrace "exprType" (pprCoreExpr other) alphaTy +exprType other = pprPanic "exprType" (pprCoreExpr other) coreAltType :: CoreAlt -> Type -- ^ Returns the type of the alternatives right hand side diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs index 40987425b5..dcbe1b660c 100644 --- a/compiler/GHC/Driver/Session.hs +++ b/compiler/GHC/Driver/Session.hs @@ -2880,7 +2880,7 @@ dynamic_flags_deps = [ , make_dep_flag defFlag "funfolding-keeness-factor" (floatSuffix (\_ d -> d)) - "-funfolding-keeness-factor is no longer respected as of GHC 8.12" + "-funfolding-keeness-factor is no longer respected as of GHC 9.0" , make_ord_flag defFlag "fmax-worker-args" (intSuffix (\n d -> d {maxWorkerArgs = n})) diff --git a/compiler/GHC/Hs/ImpExp.hs b/compiler/GHC/Hs/ImpExp.hs index aeb9131e30..740aab2b61 100644 --- a/compiler/GHC/Hs/ImpExp.hs +++ b/compiler/GHC/Hs/ImpExp.hs @@ -311,9 +311,6 @@ ieWrappedName (IEType (L _ n)) = n lieWrappedName :: LIEWrappedName name -> name lieWrappedName (L _ n) = ieWrappedName n -ieLWrappedName :: LIEWrappedName name -> Located name -ieLWrappedName (L l n) = L l (ieWrappedName n) - replaceWrappedName :: IEWrappedName name1 -> name2 -> IEWrappedName name2 replaceWrappedName (IEName (L l _)) n = IEName (L l n) replaceWrappedName (IEPattern (L l _)) n = IEPattern (L l n) diff --git a/compiler/GHC/Tc/Gen/Head.hs b/compiler/GHC/Tc/Gen/Head.hs index 163f5cda5b..50ff9508ca 100644 --- a/compiler/GHC/Tc/Gen/Head.hs +++ b/compiler/GHC/Tc/Gen/Head.hs @@ -593,9 +593,9 @@ lookupParents rdr where lookupParent :: GlobalRdrElt -> RnM (RecSelParent, GlobalRdrElt) lookupParent gre = do { id <- tcLookupId (gre_name gre) - ; if isRecordSelector id - then return (recordSelectorTyCon id, gre) - else failWithTc (notSelector (gre_name gre)) } + ; case recordSelectorTyCon_maybe id of + Just rstc -> return (rstc, gre) + Nothing -> failWithTc (notSelector (gre_name gre)) } fieldNotInType :: RecSelParent -> RdrName -> SDoc diff --git a/compiler/GHC/Tc/Instance/Typeable.hs b/compiler/GHC/Tc/Instance/Typeable.hs index 42112b4a30..7758caf712 100644 --- a/compiler/GHC/Tc/Instance/Typeable.hs +++ b/compiler/GHC/Tc/Instance/Typeable.hs @@ -350,7 +350,7 @@ mkPrimTypeableTodos -- Note [Built-in syntax and the OrigNameCache] in "GHC.Iface.Env" for more. ghcPrimTypeableTyCons :: [TyCon] ghcPrimTypeableTyCons = concat - [ [ runtimeRepTyCon, vecCountTyCon, vecElemTyCon, funTyCon ] + [ [ runtimeRepTyCon, vecCountTyCon, vecElemTyCon ] , map (tupleTyCon Unboxed) [0..mAX_TUPLE_SIZE] , map sumTyCon [2..mAX_SUM_SIZE] , primTyCons diff --git a/compiler/GHC/Types/Id.hs b/compiler/GHC/Types/Id.hs index 2a45bd3389..4727ce443d 100644 --- a/compiler/GHC/Types/Id.hs +++ b/compiler/GHC/Types/Id.hs @@ -46,6 +46,7 @@ module GHC.Types.Id ( -- ** Taking an Id apart idName, idType, idMult, idScaledType, idUnique, idInfo, idDetails, recordSelectorTyCon, + recordSelectorTyCon_maybe, -- ** Modifying an Id setIdName, setIdUnique, GHC.Types.Id.setIdType, setIdMult, @@ -438,10 +439,15 @@ That is what is happening in, say tidy_insts in GHC.Iface.Tidy. -- | If the 'Id' is that for a record selector, extract the 'sel_tycon'. Panic otherwise. recordSelectorTyCon :: Id -> RecSelParent recordSelectorTyCon id - = case Var.idDetails id of - RecSelId { sel_tycon = parent } -> parent + = case recordSelectorTyCon_maybe id of + Just parent -> parent _ -> panic "recordSelectorTyCon" +recordSelectorTyCon_maybe :: Id -> Maybe RecSelParent +recordSelectorTyCon_maybe id + = case Var.idDetails id of + RecSelId { sel_tycon = parent } -> Just parent + _ -> Nothing isRecordSelector :: Id -> Bool isNaughtyRecordSelector :: Id -> Bool diff --git a/testsuite/tests/concurrent/prog001/Arithmetic.hs b/testsuite/tests/concurrent/prog001/Arithmetic.hs index 183b66c0ed..bce3ff6400 100644 --- a/testsuite/tests/concurrent/prog001/Arithmetic.hs +++ b/testsuite/tests/concurrent/prog001/Arithmetic.hs @@ -5,7 +5,7 @@ import Control.Concurrent.MVar import System.IO.Unsafe import Utilities import Converter -import GHC.Data.Stream +import Stream import Data.Ratio import Trit diff --git a/testsuite/tests/concurrent/prog001/Converter.hs b/testsuite/tests/concurrent/prog001/Converter.hs index ba4132dc43..cba86e0cfd 100644 --- a/testsuite/tests/concurrent/prog001/Converter.hs +++ b/testsuite/tests/concurrent/prog001/Converter.hs @@ -1,7 +1,7 @@ module Converter (rationalToGray, grayToSignIO, signToGray, Gray, startF, startC) where -import GHC.Data.Stream +import Stream import Data.Ratio import Control.Concurrent import Control.Concurrent.MVar diff --git a/testsuite/tests/concurrent/prog001/Thread.hs b/testsuite/tests/concurrent/prog001/Thread.hs index 18799607a1..12886a8456 100644 --- a/testsuite/tests/concurrent/prog001/Thread.hs +++ b/testsuite/tests/concurrent/prog001/Thread.hs @@ -3,7 +3,7 @@ module Thread (threadTesting1) where import Control.Concurrent import Control.Concurrent.MVar -import GHC.Data.Stream +import Stream import Converter threadTesting1 :: Gray -> Gray -> IO Int diff --git a/testsuite/tests/concurrent/prog001/Trit.hs b/testsuite/tests/concurrent/prog001/Trit.hs index f81bc8bf21..8674d6510b 100644 --- a/testsuite/tests/concurrent/prog001/Trit.hs +++ b/testsuite/tests/concurrent/prog001/Trit.hs @@ -2,7 +2,7 @@ module Trit (Trit, rationalToTrit, getIntegral, getFraction, getFraction', neg, addTrits, subTrits, shiftLeft, shiftRight, multiply ) where -import GHC.Data.Stream +import Stream import Utilities import Data.Ratio diff --git a/testsuite/tests/concurrent/prog001/Utilities.hs b/testsuite/tests/concurrent/prog001/Utilities.hs index faa15d8f8c..0ebdb3db9c 100644 --- a/testsuite/tests/concurrent/prog001/Utilities.hs +++ b/testsuite/tests/concurrent/prog001/Utilities.hs @@ -1,6 +1,6 @@ module Utilities (toBinary, fl) where -import GHC.Data.Stream +import Stream import Data.Ratio -- Convert from an Integer to its signed-digit representation diff --git a/testsuite/tests/concurrent/prog001/all.T b/testsuite/tests/concurrent/prog001/all.T index 0b73b3d5ad..39327b0a85 100644 --- a/testsuite/tests/concurrent/prog001/all.T +++ b/testsuite/tests/concurrent/prog001/all.T @@ -16,4 +16,4 @@ test('concprog001', [extra_files(['Arithmetic.hs', 'Converter.hs', 'Mult.hs', 'S when(fast(), skip), only_ways(['threaded2']), fragile(16604), run_timeout_multiplier(2)], - multimod_compile_and_run, ['Mult', '-package ghc']) + multimod_compile_and_run, ['Mult', '']) |